Exception: Addressing::UnknownCountryError
- Defined in:
- lib/addressing/exceptions.rb
Overview
Raised when an unknown country code is provided
Instance Attribute Summary collapse
-
#country_code ⇒ Object
readonly
Returns the value of attribute country_code.
Instance Method Summary collapse
-
#initialize(country_code) ⇒ UnknownCountryError
constructor
A new instance of UnknownCountryError.
Constructor Details
#initialize(country_code) ⇒ UnknownCountryError
Returns a new instance of UnknownCountryError.
9 10 11 12 |
# File 'lib/addressing/exceptions.rb', line 9 def initialize(country_code) super("Unknown country code: #{country_code}") @country_code = country_code end |
Instance Attribute Details
#country_code ⇒ Object (readonly)
Returns the value of attribute country_code.
14 15 16 |
# File 'lib/addressing/exceptions.rb', line 14 def country_code @country_code end |