ruby/lib/csv/core_ext/array.rb

10 строки
205 B
Ruby

class Array # :nodoc:
# Equivalent to CSV::generate_line(self, options)
#
# ["CSV", "data"].to_csv
# #=> "CSV,data\n"
def to_csv(**options)
CSV.generate_line(self, **options)
end
end