class Object
Public Instance Methods
CSVHash(arg, columns=nil)
click to toggle source
Pass either a path to a csv file to parse which will return an array of hashes (stringified keys) or pass an array of hashes and an array of column names See readme.rdoc for more detaild information
# File lib/csv-hash.rb, line 72 def CSVHash arg, columns=nil if arg.is_a?(File) CSVHash.from_file(arg.path) elsif arg.is_a?(String) CSVHash.from_file(arg) elsif arg.is_a?(Array) && columns.is_a?(Array) CSVHash.to_string(arg,columns) end end