Class: CSVStepImporter::Row
- Defined in:
- lib/csv_step_importer/row.rb
Instance Attribute Summary collapse
-
#attributes ⇒ Object
Returns the value of attribute attributes.
-
#cache ⇒ Object
Returns the value of attribute cache.
-
#row_number ⇒ Object
Returns the value of attribute row_number.
Attributes inherited from Node
Instance Method Summary collapse
- #create_or_update ⇒ Object
-
#initialize(parent:, row_number:, **attributes) ⇒ Row
constructor
A new instance of Row.
Methods inherited from Node
#add_children, #run_validations!, #validate_children
Methods inherited from Base
#assign_attributes, #inspect, #persisted?, #save, #save!, #to_s, #update
Constructor Details
#initialize(parent:, row_number:, **attributes) ⇒ Row
Returns a new instance of Row.
7 8 9 10 11 12 13 |
# File 'lib/csv_step_importer/row.rb', line 7 def initialize(parent:, row_number:, **attributes) super parent: parent self.cache = {} self.attributes = attributes self.row_number = row_number end |
Instance Attribute Details
#attributes ⇒ Object
Returns the value of attribute attributes.
5 6 7 |
# File 'lib/csv_step_importer/row.rb', line 5 def attributes @attributes end |
#cache ⇒ Object
Returns the value of attribute cache.
5 6 7 |
# File 'lib/csv_step_importer/row.rb', line 5 def cache @cache end |
#row_number ⇒ Object
Returns the value of attribute row_number.
5 6 7 |
# File 'lib/csv_step_importer/row.rb', line 5 def row_number @row_number end |
Instance Method Details
#create_or_update ⇒ Object
15 16 17 18 |
# File 'lib/csv_step_importer/row.rb', line 15 def create_or_update # Rowの保存処理は基本的にstepsで行います true end |