lib/squib/api/data.rb in squib-0.0.6 vs lib/squib/api/data.rb in squib-0.1.0

- old
+ new

@@ -52,15 +52,15 @@ # # 1,2 # # 3,4 # data = csv file: 'data.csv' # => {'h1' => [1,3], 'h2' => [2,4]} # - # Parsing uses Ruby's CSV, options: {headers: true, converters: :numeric} + # Parsing uses Ruby's CSV, with options `{headers: true, converters: :numeric}` # http://www.ruby-doc.org/stdlib-2.0/libdoc/csv/rdoc/CSV.html # # @option opts file [String] the CSV-formatted file to open. Opens relative to the current directory. - # @return [Hash] a hash of arrays based on columns in the spreadsheet + # @return [Hash] a hash of arrays based on columns in the table # @api public def csv(opts = {}) opts = Squib::SYSTEM_DEFAULTS.merge(opts) opts = Squib::InputHelpers.fileify(opts) table = CSV.read(opts[:file], headers: true, converters: :numeric) @@ -88,9 +88,10 @@ # Convenience call on deck goes to the module function def xlsx(opts = {}) Squib.xlsx(opts) end + # Convenience call on deck goes to the module function def csv(opts = {}) Squib.csv(opts) end end