End of Life Ruby 3.0 has reached end of life and gets no more fixes. Switch to Ruby 4.0 →
instance method
CSV::Table#to_a
to_a
lib/csv/table.rb
View on GitHub ↗
# File tmp/rubies/ruby-3.0.5/lib/csv/table.rb, line 572
def to_a
array = [headers]
@table.each do |row|
array.push(row.fields) unless row.header_row?
end
array
end
Returns the table as an Array of Arrays. Headers will be the first row, then all of the field rows will follow.