Exception: Timeprice::UnsupportedCountry
- Defined in:
- lib/timeprice/errors.rb
Overview
Raised when a country code is not in Supported::COUNTRIES.
Instance Attribute Summary collapse
-
#country ⇒ Object
readonly
Returns the value of attribute country.
Instance Method Summary collapse
-
#initialize(country) ⇒ UnsupportedCountry
constructor
A new instance of UnsupportedCountry.
Constructor Details
#initialize(country) ⇒ UnsupportedCountry
Returns a new instance of UnsupportedCountry.
14 15 16 17 |
# File 'lib/timeprice/errors.rb', line 14 def initialize(country) @country = country super("Unsupported country: #{country.inspect} (supported: #{Supported::COUNTRIES.join(", ")})") end |
Instance Attribute Details
#country ⇒ Object (readonly)
Returns the value of attribute country.
12 13 14 |
# File 'lib/timeprice/errors.rb', line 12 def country @country end |