Class: Geonames::CountryInfo

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeCountryInfo

Returns a new instance of CountryInfo.



11
12
13
14
# File 'lib/country_info.rb', line 11

def initialize
  @langs = []
  @bounding_box = BoundingBox.new()
end

Instance Attribute Details

#area_sq_kmObject

Returns the value of attribute area_sq_km.



4
5
6
# File 'lib/country_info.rb', line 4

def area_sq_km
  @area_sq_km
end

#capitalObject

Returns the value of attribute capital.



4
5
6
# File 'lib/country_info.rb', line 4

def capital
  @capital
end

#continentObject

Returns the value of attribute continent.



4
5
6
# File 'lib/country_info.rb', line 4

def continent
  @continent
end

#country_codeObject

Returns the value of attribute country_code.



3
4
5
# File 'lib/country_info.rb', line 3

def country_code
  @country_code
end

#country_nameObject

Returns the value of attribute country_name.



3
4
5
# File 'lib/country_info.rb', line 3

def country_name
  @country_name
end

#currency_codeObject

Returns the value of attribute currency_code.



5
6
7
# File 'lib/country_info.rb', line 5

def currency_code
  @currency_code
end

#fips_codeObject

Returns the value of attribute fips_code.



4
5
6
# File 'lib/country_info.rb', line 4

def fips_code
  @fips_code
end

#geoname_idObject

Returns the value of attribute geoname_id.



5
6
7
# File 'lib/country_info.rb', line 5

def geoname_id
  @geoname_id
end

#iso_alpha_3Object

Returns the value of attribute iso_alpha_3.



3
4
5
# File 'lib/country_info.rb', line 3

def iso_alpha_3
  @iso_alpha_3
end

#iso_numericObject

Returns the value of attribute iso_numeric.



3
4
5
# File 'lib/country_info.rb', line 3

def iso_numeric
  @iso_numeric
end

#populationObject

Returns the value of attribute population.



4
5
6
# File 'lib/country_info.rb', line 4

def population
  @population
end

Instance Method Details

#bounding_boxObject



16
17
18
# File 'lib/country_info.rb', line 16

def bounding_box
  return @bounding_box
end

#bounding_box=(new_bb) ⇒ Object



20
21
22
# File 'lib/country_info.rb', line 20

def bounding_box=(new_bb)
  @bounding_box = new_bb
end

#languagesObject



28
29
30
# File 'lib/country_info.rb', line 28

def languages
  return @langs
end

#languages=(new_langs) ⇒ Object



32
33
34
# File 'lib/country_info.rb', line 32

def languages=(new_langs)
  @langs = new_langs
end

#set_bounding_box(north, south, east, west) ⇒ Object



24
25
26
# File 'lib/country_info.rb', line 24

def set_bounding_box(north, south, east, west)
  @bounding_box = BoundingBox.new(north, south, east, west)
end