Class: Smith::Budget::ReservationContract
- Inherits:
-
Object
- Object
- Smith::Budget::ReservationContract
- Extended by:
- Dry::Initializer
- Defined in:
- lib/smith/budget/reservation_contract.rb
Instance Method Summary collapse
Instance Method Details
#amounts!(reservation) ⇒ Object
18 19 20 21 |
# File 'lib/smith/budget/reservation_contract.rb', line 18 def amounts!(reservation) token!(reservation) reservation.amounts end |
#token!(reservation) ⇒ Object
12 13 14 15 16 |
# File 'lib/smith/budget/reservation_contract.rb', line 12 def token!(reservation) validate_receipt!(reservation) reservation.identity_for(ledger_identity) || raise(ArgumentError, "budget reservation belongs to another ledger") end |