Class: Squib::Args::CSV_Opts Private

Inherits:
Object
  • Object
show all
Defined in:
lib/squib/args/csv_opts.rb

This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.

Instance Method Summary collapse

Constructor Details

#initialize(opts) ⇒ CSV_Opts

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Returns a new instance of CSV_Opts



8
9
10
11
# File 'lib/squib/args/csv_opts.rb', line 8

def initialize(opts)
  opts = opts.keep_if { |k, _v| CSV::DEFAULT_OPTIONS.key? k}
  @hash = CSV::DEFAULT_OPTIONS.merge(opts).merge(required)
end

Instance Method Details

#to_hashObject

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



13
14
15
# File 'lib/squib/args/csv_opts.rb', line 13

def to_hash
  @hash
end