def hash_csv(csv_string)
      require 'csv'

      csv = CSV.parse(csv_string)
      headers = csv.shift
      output = []

      csv.each do |row|
        hash = {}
        headers.each do |header|
          hash[header] = row.shift.to_s
        end
        output << hash
      end

      return output
    end
def hash_csv(csv_string)
      require 'csv'

      csv = CSV.parse(csv_string)
      headers = csv.shift
      output = []

      csv.each do |row|
        hash = {}
        headers.each do |header|
          hash[header] = row.shift.to_s
        end
        output << hash
      end

      return output
    end
Needs to be refactored to somewhere more generic