Class: Gaigo::Countries::Country
- Inherits:
-
Object
- Object
- Gaigo::Countries::Country
- Defined in:
- lib/gaigo/countries.rb
Instance Attribute Summary collapse
-
#code ⇒ Object
readonly
Returns the value of attribute code.
-
#en ⇒ Object
readonly
Returns the value of attribute en.
-
#native ⇒ Object
readonly
Returns the value of attribute native.
Instance Method Summary collapse
-
#initialize(en, code, native) ⇒ Country
constructor
A new instance of Country.
- #to_s ⇒ Object
Constructor Details
#initialize(en, code, native) ⇒ Country
Returns a new instance of Country.
9 10 11 12 13 14 |
# File 'lib/gaigo/countries.rb', line 9 def initialize(en, code, native) @en = en @code = code @native = native freeze end |
Instance Attribute Details
#code ⇒ Object (readonly)
Returns the value of attribute code.
8 9 10 |
# File 'lib/gaigo/countries.rb', line 8 def code @code end |
#en ⇒ Object (readonly)
Returns the value of attribute en.
8 9 10 |
# File 'lib/gaigo/countries.rb', line 8 def en @en end |
#native ⇒ Object (readonly)
Returns the value of attribute native.
8 9 10 |
# File 'lib/gaigo/countries.rb', line 8 def native @native end |
Instance Method Details
#to_s ⇒ Object
15 16 17 |
# File 'lib/gaigo/countries.rb', line 15 def to_s "#{en} (#{native})" end |