Exception: Num2words::UnsupportedCurrencyError
- Defined in:
- lib/num2words/errors.rb
Instance Attribute Summary collapse
-
#currency ⇒ Object
readonly
Returns the value of attribute currency.
-
#locale ⇒ Object
readonly
Returns the value of attribute locale.
Instance Method Summary collapse
-
#initialize(locale:, currency:) ⇒ UnsupportedCurrencyError
constructor
A new instance of UnsupportedCurrencyError.
Constructor Details
#initialize(locale:, currency:) ⇒ UnsupportedCurrencyError
Returns a new instance of UnsupportedCurrencyError.
32 33 34 35 36 37 |
# File 'lib/num2words/errors.rb', line 32 def initialize(locale:, currency:) @locale = locale @currency = currency super("Currency #{currency} is not supported for locale #{locale}") end |
Instance Attribute Details
#currency ⇒ Object (readonly)
Returns the value of attribute currency.
30 31 32 |
# File 'lib/num2words/errors.rb', line 30 def currency @currency end |
#locale ⇒ Object (readonly)
Returns the value of attribute locale.
30 31 32 |
# File 'lib/num2words/errors.rb', line 30 def locale @locale end |