instance method
step_with_blockless
Ruby on Rails 3.2.22.5
Since v3.0.20 Last seen in v3.2.22.5Signature
step_with_blockless(*args, &block)
Return an array when step is called without a block.
Parameters
-
argsrest -
blockblock
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