Class: MassInsert::Adapters::AbstractAdapter
- Inherits:
-
SimpleDelegator
- Object
- SimpleDelegator
- MassInsert::Adapters::AbstractAdapter
- Defined in:
- lib/mass_insert/adapters/abstract_adapter.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#options ⇒ Object
Returns the value of attribute options.
-
#values ⇒ Object
Returns the value of attribute values.
Instance Method Summary collapse
-
#initialize(values, options) ⇒ AbstractAdapter
constructor
A new instance of AbstractAdapter.
- #to_sql ⇒ Object
Constructor Details
#initialize(values, options) ⇒ AbstractAdapter
Returns a new instance of AbstractAdapter.
6 7 8 9 10 |
# File 'lib/mass_insert/adapters/abstract_adapter.rb', line 6 def initialize(values, ) super(.fetch(:class_name)) @values = values @options = end |
Instance Attribute Details
#options ⇒ Object
Returns the value of attribute options.
4 5 6 |
# File 'lib/mass_insert/adapters/abstract_adapter.rb', line 4 def @options end |
#values ⇒ Object
Returns the value of attribute values.
4 5 6 |
# File 'lib/mass_insert/adapters/abstract_adapter.rb', line 4 def values @values end |
Instance Method Details
#to_sql ⇒ Object
12 13 14 |
# File 'lib/mass_insert/adapters/abstract_adapter.rb', line 12 def to_sql "#{insert_sql} #{values_sql};" end |