Class: Spree::Stock::Splitter::Base

Inherits:
Object
  • Object
show all
Defined in:
app/models/spree/stock/splitter/base.rb

Direct Known Subclasses

Backordered, ShippingCategory, Weight

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(packer, next_splitter = nil) ⇒ Base

Returns a new instance of Base



7
8
9
10
# File 'app/models/spree/stock/splitter/base.rb', line 7

def initialize(packer, next_splitter = nil)
  @packer = packer
  @next_splitter = next_splitter
end

Instance Attribute Details

#next_splitterObject (readonly)

Returns the value of attribute next_splitter



5
6
7
# File 'app/models/spree/stock/splitter/base.rb', line 5

def next_splitter
  @next_splitter
end

#packerObject (readonly)

Returns the value of attribute packer



5
6
7
# File 'app/models/spree/stock/splitter/base.rb', line 5

def packer
  @packer
end

Instance Method Details

#split(packages) ⇒ Object



13
14
15
# File 'app/models/spree/stock/splitter/base.rb', line 13

def split(packages)
  return_next(packages)
end