Class: Thirsty::Today::Add

Inherits:
Callable show all
Defined in:
lib/thirsty/today/add.rb

Instance Method Summary collapse

Methods inherited from Callable

call

Constructor Details

#initialize(amount) ⇒ Add

Returns a new instance of Add.



8
9
10
# File 'lib/thirsty/today/add.rb', line 8

def initialize(amount)
  @amount = amount
end

Instance Method Details

#callObject



12
13
14
15
# File 'lib/thirsty/today/add.rb', line 12

def call
  validate_amount
  update_amount
end