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