Class: GeoMagic::Location::Country

Inherits:
Object
  • Object
show all
Defined in:
lib/geo_magic/location.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#codeObject

Returns the value of attribute code.



62
63
64
# File 'lib/geo_magic/location.rb', line 62

def code
  @code
end

#nameObject

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_sObject



69
70
71
# File 'lib/geo_magic/location.rb', line 69

def to_s
  "country: #{name}, code: #{code}"
end