Class: Vvm::State::EmptyBalance
- Inherits:
-
Base
- Object
- Base
- Vvm::State::EmptyBalance
show all
- Defined in:
- lib/vvm/state/empty_balance.rb
Instance Method Summary
collapse
Methods inherited from Base
#dispense, #initialize
Instance Method Details
#insert(coin) ⇒ Object
6
7
8
9
10
|
# File 'lib/vvm/state/empty_balance.rb', line 6
def insert(coin)
machine.balance += coin
machine.state = Vvm::State::PositiveBalance.new(machine) unless coin <= 0
machine
end
|
#pick(_product_name) ⇒ Object
12
13
14
|
# File 'lib/vvm/state/empty_balance.rb', line 12
def pick(_product_name)
raise InsufficientBalance
end
|