Closed myabc closed 6 months ago
This allows for chaining Enumerators, e.g.
sheet.each.with_index do |row, index| # ... end
and matches behaviour of Array#each/Hash#each
Array#each
Hash#each
enum = [1, 2, 3].each # => #<Enumerator: ...> enum.peek # => 1
Great idea, thanks for contributing!
This allows for chaining Enumerators, e.g.
and matches behaviour of
Array#each
/Hash#each