Class: GeoMagic::Location::Country
- Inherits:
-
Object
- Object
- GeoMagic::Location::Country
- Defined in:
- lib/geo_magic/location.rb
Instance Attribute Summary collapse
-
#code ⇒ Object
Returns the value of attribute code.
-
#name ⇒ Object
Returns the value of attribute name.
Instance Method Summary collapse
-
#initialize(name, code) ⇒ Country
constructor
A new instance of Country.
- #to_s ⇒ Object
Constructor Details
#initialize(name, code) ⇒ Country
Returns a new instance of Country.
64 65 66 67 |
# File 'lib/geo_magic/location.rb', line 64 def initialize name, code @name = name @code = code end |
Instance Attribute Details
#code ⇒ Object
Returns the value of attribute code.
62 63 64 |
# File 'lib/geo_magic/location.rb', line 62 def code @code end |
#name ⇒ Object
Returns the value of attribute name.
62 63 64 |
# File 'lib/geo_magic/location.rb', line 62 def name @name end |
Instance Method Details
#to_s ⇒ Object
69 70 71 |
# File 'lib/geo_magic/location.rb', line 69 def to_s "country: #{name}, code: #{code}" end |