def to_csv(local_config = nil)
      csv_options = options.merge(local_options(local_config))
      rows = padded_rows.map do |data|
        CSV::Row.new(@header.mapped_columns, data, false)
      end

      if csv_options[:write_headers] && rows.empty?
        rows << CSV::Row.new(@header.mapped_columns, [], true)
      end

      table = CSV::Table.new(rows)
      csv_options.except!(*custom_options.keys)
      table.to_csv(csv_options)
    end
def to_csv(local_config = nil)
      csv_options = options.merge(local_options(local_config))
      rows = padded_rows.map do |data|
        CSV::Row.new(@header.mapped_columns, data, false)
      end

      if csv_options[:write_headers] && rows.empty?
        rows << CSV::Row.new(@header.mapped_columns, [], true)
      end

      table = CSV::Table.new(rows)
      csv_options.except!(*custom_options.keys)
      table.to_csv(csv_options)
    end
Public: converts the Shaper mapped headers and rows into
 a CSV String

 Returns a String