Class: CSVStepImporter::Row

Inherits:
Node show all
Defined in:
lib/csv_step_importer/row.rb

Instance Attribute Summary collapse

Attributes inherited from Node

#children, #env, #parent

Instance Method Summary collapse

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

#attributesObject

Returns the value of attribute attributes.



5
6
7
# File 'lib/csv_step_importer/row.rb', line 5

def attributes
  @attributes
end

#cacheObject

Returns the value of attribute cache.



5
6
7
# File 'lib/csv_step_importer/row.rb', line 5

def cache
  @cache
end

#row_numberObject

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_updateObject



15
16
17
18
# File 'lib/csv_step_importer/row.rb', line 15

def create_or_update
  # Rowの保存処理は基本的にstepsで行います
  true
end