Method: Numeric#things

Defined in:
lib/epitools/core_ext/numbers.rb

#things(&block) ⇒ Object

If n.times is like each, n.things is like map. Return



79
80
81
82
83
84
85
# File 'lib/epitools/core_ext/numbers.rb', line 79

def things(&block)
  if block_given?
    Array.new(self, &block)
  else
    (0...self).to_a
  end
end