Class: Spree::Stock::Splitter::Backordered
- Defined in:
- app/models/spree/stock/splitter/backordered.rb
Instance Attribute Summary
Attributes inherited from Base
Instance Method Summary collapse
Methods inherited from Base
Constructor Details
This class inherits a constructor from Spree::Stock::Splitter::Base
Instance Method Details
#split(packages) ⇒ Object
5 6 7 8 9 10 11 12 13 14 15 |
# File 'app/models/spree/stock/splitter/backordered.rb', line 5 def split(packages) split_packages = [] packages.each do |package| split_packages << build_package(package.on_hand) unless package.on_hand.empty? split_packages << build_package(package.backordered) unless package.backordered.empty? end return_next(split_packages) end |