Module: Enumerable
- Defined in:
- lib/typed_attr/enumerable.rb
Instance Method Summary collapse
-
#map_with_index ⇒ Object
Not sure why this doesn’t exist or where to put it.
Instance Method Details
#map_with_index ⇒ Object
Not sure why this doesn’t exist or where to put it.
4 5 6 7 |
# File 'lib/typed_attr/enumerable.rb', line 4 def map_with_index i = -1 map { | e | yield e, i += 1 } end |