Class: Parsec::Location
Constant Summary
Constants inherited from Base
Instance Attribute Summary collapse
-
#code ⇒ Object
readonly
Returns the value of attribute code.
-
#country_iso ⇒ Object
readonly
Returns the value of attribute country_iso.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
Instance Method Summary collapse
-
#initialize(code:, name: nil, city_code: nil, country_iso: nil) ⇒ Location
constructor
A new instance of Location.
Constructor Details
#initialize(code:, name: nil, city_code: nil, country_iso: nil) ⇒ Location
Returns a new instance of Location.
7 8 9 10 11 12 |
# File 'lib/parsec/location.rb', line 7 def initialize(code:, name: nil, city_code: nil, country_iso: nil) @code = code @name = name @city_code = city_code @country_iso = country_iso end |
Instance Attribute Details
#code ⇒ Object (readonly)
Returns the value of attribute code.
5 6 7 |
# File 'lib/parsec/location.rb', line 5 def code @code end |
#country_iso ⇒ Object (readonly)
Returns the value of attribute country_iso.
5 6 7 |
# File 'lib/parsec/location.rb', line 5 def country_iso @country_iso end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
5 6 7 |
# File 'lib/parsec/location.rb', line 5 def name @name end |