class Csv2Psql::CsvHelper

CSV Helper

Constants

BASE_DIR

Public Class Methods

get_header(row, opts = {}) click to toggle source
# File lib/csv2psql/helpers/csv_helper.rb, line 12
def get_header(row, opts = {})
  if opts[:header]
    row.headers
  else
    row.map.with_index { |_item, i| i }
  end
end