Sha256: f020a82b133a1025fddb97b2616fffa5f2893ee62da96559b1295d34e65ac58f
Contents?: true
Size: 478 Bytes
Versions: 16
Compression:
Stored size: 478 Bytes
Contents
# Implements CSV Import functionality #------------------------------------------------------------------------------ module CsvImporter require 'csv' # import data from CSV file and return an Array of Hashes #------------------------------------------------------------------------------ def csv_import(the_file) import_list = Array.new CSV.foreach(the_file, headers: true) do |row| import_list << row.to_hash end return import_list end end
Version data entries
16 entries across 16 versions & 1 rubygems