Class: Workarea::Inventory::Policies::Ignore

Inherits:
Base
  • Object
show all
Defined in:
app/models/workarea/inventory/policies/ignore.rb

Instance Attribute Summary

Attributes inherited from Base

#sku

Instance Method Summary collapse

Methods inherited from Base

#initialize

Constructor Details

This class inherits a constructor from Workarea::Inventory::Policies::Base

Instance Method Details

#available_to_sellObject



9
10
11
# File 'app/models/workarea/inventory/policies/ignore.rb', line 9

def available_to_sell
  99999
end

#displayable?Boolean

Returns:

  • (Boolean)


5
6
7
# File 'app/models/workarea/inventory/policies/ignore.rb', line 5

def displayable?
  true
end

#purchase(quantity) ⇒ Object



13
14
15
16
# File 'app/models/workarea/inventory/policies/ignore.rb', line 13

def purchase(quantity)
  sku.inc(purchased: quantity)
  nil
end