Class: Spree::Stock::Splitter::Weight Private
- Defined in:
- app/models/spree/stock/splitter/weight.rb
This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.
Instance Attribute Summary collapse
- #next_splitter ⇒ Object readonly private
- #packer ⇒ Object readonly private
Instance Method Summary collapse
- #split(packages) ⇒ Object private
Methods inherited from Base
Constructor Details
This class inherits a constructor from Spree::Stock::Splitter::Base
Instance Attribute Details
#next_splitter ⇒ Object (readonly)
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
5 6 7 |
# File 'app/models/spree/stock/splitter/weight.rb', line 5 def next_splitter @next_splitter end |
#packer ⇒ Object (readonly)
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
5 6 7 |
# File 'app/models/spree/stock/splitter/weight.rb', line 5 def packer @packer end |
Instance Method Details
#split(packages) ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
11 12 13 14 15 16 17 |
# File 'app/models/spree/stock/splitter/weight.rb', line 11 def split(packages) packages.each do |package| removed_contents = reduce package packages << build_package(removed_contents) unless removed_contents.empty? end return_next packages end |