Class: Spree::Stock::Allocator::Base

Inherits:
Object
  • Object
show all
Defined in:
core/app/models/spree/stock/allocator/base.rb

Direct Known Subclasses

OnHandFirst

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(availability) ⇒ Base

Returns a new instance of Base



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

def initialize(availability)
  @availability = availability
end

Instance Attribute Details

#availabilityObject (readonly)

Returns the value of attribute availability



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

def availability
  @availability
end

Instance Method Details

#allocate_inventory(_desired) ⇒ Object

Raises:

  • (NotImplementedError)


13
14
15
# File 'core/app/models/spree/stock/allocator/base.rb', line 13

def allocate_inventory(_desired)
  raise NotImplementedError
end