instance method step_with_blockless

Ruby on Rails 3.2.22.5

Since v3.0.20 Last seen in v3.2.22.5

Available in: v3.0.20 v3.1.12 v3.2.22.5

Signature

step_with_blockless(*args, &block)

Return an array when step is called without a block.

Parameters

args rest
block block
Source
# File activesupport/lib/active_support/core_ext/range/blockless_step.rb, line 9
    def step_with_blockless(*args, &block)
      if block_given?
        step_without_blockless(*args, &block)
      else
        array = []
        step_without_blockless(*args) { |step| array << step }
        array
      end
    end

Defined in activesupport/lib/active_support/core_ext/range/blockless_step.rb line 9 · View on GitHub · Improve this page · Find usages on GitHub

Defined in Range

Type at least 2 characters to search.

↑↓ navigate · open · esc close