Exception: KktShoppe::Errors::NotEnoughStock

Inherits:
KktShoppe::Error show all
Defined in:
lib/kkt_shoppe/errors/not_enough_stock.rb

Instance Method Summary collapse

Methods inherited from KktShoppe::Error

#initialize, #message, #options

Constructor Details

This class inherits a constructor from KktShoppe::Error

Instance Method Details

#available_stockObject



5
6
7
# File 'lib/kkt_shoppe/errors/not_enough_stock.rb', line 5

def available_stock
  @options[:ordered_item].stock
end

#requested_stockObject



9
10
11
# File 'lib/kkt_shoppe/errors/not_enough_stock.rb', line 9

def requested_stock
  @options[:requested_stock]
end