End of Life Ruby 3.0 has reached end of life and gets no more fixes. Switch to Ruby 4.0 →
instance method
CSV::Row#each_pair
each_pair(&block)
lib/csv/row.rb
View on GitHub ↗
# File tmp/rubies/ruby-3.0.5/lib/csv/row.rb, line 508
def each(&block)
return enum_for(__method__) { size } unless block_given?
@row.each(&block)
self # for chaining
end
Alias of #each
Yields each pair of the row as header and field tuples (much like iterating over a Hash). This method returns the row for chaining.
If no block is given, an Enumerator is returned.
Support for Enumerable.