# File lib/faster_csv.rb, line 728 def to_csv(options = Hash.new) wh = options.fetch(:write_headers, true) @table.inject(wh ? [headers.to_csv(options)] : [ ]) do |rows, row| if row.header_row? rows else rows + [row.fields.to_csv(options)] end end.join end