Exception: Shoppe::Errors::NotEnoughStock
- Inherits:
-
Shoppe::Error
- Object
- StandardError
- Shoppe::Error
- Shoppe::Errors::NotEnoughStock
- Defined in:
- lib/shoppe/errors/not_enough_stock.rb
Instance Method Summary collapse
- #available_stock ⇒ Object
-
#initialize(options) ⇒ NotEnoughStock
constructor
A new instance of NotEnoughStock.
- #requested_stock ⇒ Object
Constructor Details
#initialize(options) ⇒ NotEnoughStock
Returns a new instance of NotEnoughStock.
5 6 7 |
# File 'lib/shoppe/errors/not_enough_stock.rb', line 5 def initialize() @options = end |
Instance Method Details
#available_stock ⇒ Object
9 10 11 |
# File 'lib/shoppe/errors/not_enough_stock.rb', line 9 def available_stock @options[:ordered_item].stock end |
#requested_stock ⇒ Object
13 14 15 |
# File 'lib/shoppe/errors/not_enough_stock.rb', line 13 def requested_stock @options[:requested_stock] end |