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(stock_location, next_splitter = nil) ⇒ Base

Returns a new instance of Base.



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

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

Instance Attribute Details

#next_splitterObject (readonly)

Returns the value of attribute next_splitter.



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

def next_splitter
  @next_splitter
end

#stock_locationObject (readonly)

Returns the value of attribute stock_location.



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

def stock_location
  @stock_location
end

Instance Method Details

#split(packages) ⇒ Object



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

def split(packages)
  return_next(packages)
end