Sha256: 06f59c430fcdaf8cdb4ea2ebc10e86e60abb720495c39bd88b746ee72f262586
Contents?: true
Size: 606 Bytes
Versions: 61
Compression:
Stored size: 606 Bytes
Contents
module Spree module Stock # Used by Prioritizer to adjust item quantities. # # See spec/models/spree/stock/prioritizer_spec.rb for use cases. class Adjuster attr_accessor :inventory_unit, :status, :fulfilled def initialize(inventory_unit, status) @inventory_unit = inventory_unit @status = status @fulfilled = false end def adjust(package) if fulfilled? package.remove(inventory_unit) else self.fulfilled = true end end def fulfilled? fulfilled end end end end
Version data entries
61 entries across 61 versions & 2 rubygems