| Class | Money::Bank::SingleCurrency |
| In: |
lib/money/bank/single_currency.rb
|
| Parent: | Base |
Class to ensure client code is operating in a single currency by raising if an exchange attempts to happen.
This is useful when an application uses multiple currencies but it usually deals with only one currency at a time so any arithmetic where exchanges happen are erroneous. Using this as the default bank means that that these mistakes don‘t silently do the wrong thing.
Raises a DifferentCurrencyError to remove possibility of accidentally exchanging currencies