lib/squib/args/csv_opts.rb in squib-0.15.3 vs lib/squib/args/csv_opts.rb in squib-0.16.0.pre.preview1

- old
+ new

@@ -1,25 +1,22 @@ require 'csv' -module Squib - # @api private - module Args - class CSV_Opts +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 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 + def to_hash + @hash + end - private + private - def required - { headers: true, converters: :numeric } - end - + def required + { headers: true, converters: :numeric } end + end end