lib/squib/api/data.rb in squib-0.10.0 vs lib/squib/api/data.rb in squib-0.11.0

- old
+ new

@@ -4,11 +4,11 @@ require_relative '../args/import' require_relative '../args/csv_opts' module Squib - # DSL method. See http://squib.readthedocs.org + # DSL method. See http://squib.readthedocs.io def xlsx(opts = {}) input = Args::InputFile.new(file: 'deck.xlsx').load!(opts) import = Args::Import.new.load!(opts) s = Roo::Excelx.new(input.file[0]) s.default_sheet = s.sheets[input.sheet[0]] @@ -28,11 +28,11 @@ end# col explode_quantities(data, import.explode) end# xlsx module_function :xlsx - # DSL method. See http://squib.readthedocs.org + # DSL method. See http://squib.readthedocs.io def csv(opts = {}) # TODO refactor all this out to separate methods, and its own class import = Args::Import.new.load!(opts) file = Args::InputFile.new(file: 'deck.csv').load!(opts).file[0] data = opts.key?(:data) ? opts[:data] : File.read(file) @@ -91,15 +91,15 @@ end module_function :explode_quantities class Deck - # DSL method. See http://squib.readthedocs.org + # DSL method. See http://squib.readthedocs.io def xlsx(opts = {}) Squib.xlsx(opts) end - # DSL method. See http://squib.readthedocs.org + # DSL method. See http://squib.readthedocs.io def csv(opts = {}) Squib.csv(opts) end end