Returns the table as a complete CSVString. Headers will be listed first, then all of
the field rows.
# File lib/csv.rb, line 826
def to_csv(options = Hash.new)
@table.inject([headers.to_csv(options)]) do |rows, row|
if row.header_row?
rows
else
rows + [row.fields.to_csv(options)]
end
end.join
end