Class: StructuredDataToSql::Options

Inherits:
Object
  • Object
show all
Defined in:
lib/structured_data_to_sql/options.rb

Direct Known Subclasses

JsonOptions, XmlOptions

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**values) ⇒ Options

Returns a new instance of Options.



7
8
9
10
11
# File 'lib/structured_data_to_sql/options.rb', line 7

def initialize(**values)
  @values = defaults.merge(values).freeze
  validate!
  freeze
end

Instance Attribute Details

#valuesObject (readonly)

Returns the value of attribute values.



5
6
7
# File 'lib/structured_data_to_sql/options.rb', line 5

def values
  @values
end

Instance Method Details

#to_hObject



13
14
15
# File 'lib/structured_data_to_sql/options.rb', line 13

def to_h
  @values.dup
end