Method: Enumerable#map_with_index
- Defined in:
- lib/util.rb
#map_with_index ⇒ Object
sigh…
20 21 22 23 24 |
# File 'lib/util.rb', line 20 def map_with_index # sigh... ret = [] each_with_index { |e, i| ret << yield(e, i) } ret end |
sigh…
20 21 22 23 24 |
# File 'lib/util.rb', line 20 def map_with_index # sigh... ret = [] each_with_index { |e, i| ret << yield(e, i) } ret end |