Exception: Addressing::UnknownCountryError

Inherits:
Error
  • Object
show all
Defined in:
lib/addressing/exceptions.rb

Overview

Raised when an unknown country code is provided

Instance Attribute Summary collapse

Instance Method Summary collapse

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_codeObject (readonly)

Returns the value of attribute country_code.



14
15
16
# File 'lib/addressing/exceptions.rb', line 14

def country_code
  @country_code
end