Exception: Timeprice::UnsupportedCurrency
- Defined in:
- lib/timeprice/errors.rb
Overview
Raised when a currency code is not in Supported.currencies.
Instance Attribute Summary collapse
-
#currency ⇒ Object
readonly
Returns the value of attribute currency.
Instance Method Summary collapse
-
#initialize(currency) ⇒ UnsupportedCurrency
constructor
A new instance of UnsupportedCurrency.
Constructor Details
#initialize(currency) ⇒ UnsupportedCurrency
Returns a new instance of UnsupportedCurrency.
24 25 26 27 |
# File 'lib/timeprice/errors.rb', line 24 def initialize(currency) @currency = currency super("Unsupported currency: #{currency.inspect} (supported: #{Supported.currencies.join(", ")})") end |
Instance Attribute Details
#currency ⇒ Object (readonly)
Returns the value of attribute currency.
22 23 24 |
# File 'lib/timeprice/errors.rb', line 22 def currency @currency end |