Exception: Num2words::UnsupportedCurrencyError

Inherits:
Error
  • Object
show all
Defined in:
lib/num2words/errors.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#currencyObject (readonly)

Returns the value of attribute currency.



30
31
32
# File 'lib/num2words/errors.rb', line 30

def currency
  @currency
end

#localeObject (readonly)

Returns the value of attribute locale.



30
31
32
# File 'lib/num2words/errors.rb', line 30

def locale
  @locale
end