Class: Simple::SQL::Helpers::RowConverter::TypeConverter2
- Inherits:
-
TypeConverter
- Object
- TypeConverter
- Simple::SQL::Helpers::RowConverter::TypeConverter2
- Defined in:
- lib/simple/sql/helpers/row_converter.rb
Overview
:nodoc:
Instance Method Summary collapse
- #convert_row(hsh) ⇒ Object
-
#initialize(type:, associations:, fq_table_name:) ⇒ TypeConverter2
constructor
A new instance of TypeConverter2.
Methods inherited from TypeConverter
#build_row_in_target_type, #convert_associations
Constructor Details
#initialize(type:, associations:, fq_table_name:) ⇒ TypeConverter2
Returns a new instance of TypeConverter2.
68 69 70 71 |
# File 'lib/simple/sql/helpers/row_converter.rb', line 68 def initialize(type:, associations:, fq_table_name:) super(type: type, associations: associations) @fq_table_name = fq_table_name end |
Instance Method Details
#convert_row(hsh) ⇒ Object
73 74 75 76 |
# File 'lib/simple/sql/helpers/row_converter.rb', line 73 def convert_row(hsh) hsh = convert_associations(hsh) if @associations @type.new_from_row hsh, fq_table_name: @fq_table_name end |