Sha256: cedc6e73928deef2f4de9ecd02d7d90d7ec0ed8bfa9397ed5945b564f74cb9c8
Contents?: true
Size: 563 Bytes
Versions: 48
Compression:
Stored size: 563 Bytes
Contents
# Used by Prioritizer to adjust item quantities # see prioritizer_spec for use cases module Spree module Stock 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
48 entries across 48 versions & 1 rubygems