Method: CSV::Row#to_csv

Defined in:
lib/csv/row.rb

#to_csv(**options) ⇒ Object Also known as: to_s

:call-seq:

row.to_csv -> csv_string

Returns the row as a CSV String. Headers are not included:

source = "Name,Value\nfoo,0\nbar,1\nbaz,2\n"
table = CSV.parse(source, headers: true)
row = table[0]
row.to_csv # => "foo,0\n"


694
695
696
# File 'lib/csv/row.rb', line 694

def to_csv(**options)
  fields.to_csv(**options)
end