Exception: Aloe::InvalidCurrencyError
- Inherits:
-
StandardError
- Object
- StandardError
- Aloe::InvalidCurrencyError
- Defined in:
- lib/aloe/invalid_currency_error.rb
Instance Method Summary collapse
-
#initialize(credit_account, debit_account, currency) ⇒ InvalidCurrencyError
constructor
A new instance of InvalidCurrencyError.
- #to_s ⇒ Object
Constructor Details
#initialize(credit_account, debit_account, currency) ⇒ InvalidCurrencyError
Returns a new instance of InvalidCurrencyError.
4 5 6 7 8 |
# File 'lib/aloe/invalid_currency_error.rb', line 4 def initialize(credit_account, debit_account, currency) @credit_account = credit_account @debit_account = debit_account @currency = currency end |
Instance Method Details
#to_s ⇒ Object
10 11 12 13 |
# File 'lib/aloe/invalid_currency_error.rb', line 10 def to_s "Different currencies on accounts #{@credit_account}, #{@debit_account}" + " - expected #{@currency}." end |