Class/Module Index [+]

Quicksearch

ActiveSupport::CoreExtensions::Range::BlocklessStep

Return an array when step is called without a block.

Public Instance Methods

step_with_blockless(value = 1, &block) click to toggle source
# File lib/active_support/core_ext/range/blockless_step.rb, line 11
def step_with_blockless(value = 1, &block)
  if block_given?
    step_without_blockless(value, &block)
  else
    [].tap do |array|
      step_without_blockless(value) { |step| array << step }
    end
  end
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.