Class: Spree::Imports::RowProcessors::Base

Inherits:
Object
  • Object
show all
Defined in:
app/services/spree/imports/row_processors/base.rb

Direct Known Subclasses

ProductVariant

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(row) ⇒ Base

Returns a new instance of Base.



5
6
7
8
9
# File 'app/services/spree/imports/row_processors/base.rb', line 5

def initialize(row)
  @row = row
  @import = row.import
  @attributes = row.to_schema_hash
end

Instance Attribute Details

#attributesObject (readonly)

Returns the value of attribute attributes.



11
12
13
# File 'app/services/spree/imports/row_processors/base.rb', line 11

def attributes
  @attributes
end

#importObject (readonly)

Returns the value of attribute import.



11
12
13
# File 'app/services/spree/imports/row_processors/base.rb', line 11

def import
  @import
end

#rowObject (readonly)

Returns the value of attribute row.



11
12
13
# File 'app/services/spree/imports/row_processors/base.rb', line 11

def row
  @row
end

Instance Method Details

#process!Object

Raises:

  • (NotImplementedError)


13
14
15
# File 'app/services/spree/imports/row_processors/base.rb', line 13

def process!
  raise NotImplementedError, 'Subclasses must implement the process! method'
end