method

to_csv

ruby latest stable - Class: CSV::Table
to_csv(write_headers: true, **options)
public

Returns the table as a complete CSV String. Headers will be listed first, then all of the field rows.

This method assumes you want the Table.headers(), unless you explicitly pass :write_headers => false.