lib/squib/args/csv_opts.rb in squib-0.18.0 vs lib/squib/args/csv_opts.rb in squib-0.19.0a

- old
+ new

@@ -1,22 +1,22 @@ -require 'csv' - -module Squib::Args - class CSV_Opts - - def initialize(opts) - opts = opts.keep_if { |k, _v| CSV::DEFAULT_OPTIONS.key? k} - @hash = CSV::DEFAULT_OPTIONS.merge(opts).merge(required) - end - - def to_hash - @hash - end - - private - - def required - { headers: true, converters: :numeric } - end - - end -end +require 'csv' + +module Squib::Args + class CSV_Opts + + def initialize(opts) + opts = opts.keep_if { |k, _v| CSV::DEFAULT_OPTIONS.key? k} + @hash = CSV::DEFAULT_OPTIONS.merge(opts).merge(required) + end + + def to_hash + @hash + end + + private + + def required + { headers: true, converters: :numeric } + end + + end +end