Class: Geonames::CountryInfo
- Inherits:
-
Object
- Object
- Geonames::CountryInfo
- Defined in:
- lib/country_info.rb
Instance Attribute Summary collapse
-
#area_sq_km ⇒ Object
Returns the value of attribute area_sq_km.
-
#capital ⇒ Object
Returns the value of attribute capital.
-
#continent ⇒ Object
Returns the value of attribute continent.
-
#country_code ⇒ Object
Returns the value of attribute country_code.
-
#country_name ⇒ Object
Returns the value of attribute country_name.
-
#currency_code ⇒ Object
Returns the value of attribute currency_code.
-
#fips_code ⇒ Object
Returns the value of attribute fips_code.
-
#geoname_id ⇒ Object
Returns the value of attribute geoname_id.
-
#iso_alpha_3 ⇒ Object
Returns the value of attribute iso_alpha_3.
-
#iso_numeric ⇒ Object
Returns the value of attribute iso_numeric.
-
#population ⇒ Object
Returns the value of attribute population.
Instance Method Summary collapse
- #bounding_box ⇒ Object
- #bounding_box=(new_bb) ⇒ Object
-
#initialize ⇒ CountryInfo
constructor
A new instance of CountryInfo.
- #languages ⇒ Object
- #languages=(new_langs) ⇒ Object
- #set_bounding_box(north, south, east, west) ⇒ Object
Constructor Details
#initialize ⇒ CountryInfo
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_km ⇒ Object
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 |
#capital ⇒ Object
Returns the value of attribute capital.
4 5 6 |
# File 'lib/country_info.rb', line 4 def capital @capital end |
#continent ⇒ Object
Returns the value of attribute continent.
4 5 6 |
# File 'lib/country_info.rb', line 4 def continent @continent end |
#country_code ⇒ Object
Returns the value of attribute country_code.
3 4 5 |
# File 'lib/country_info.rb', line 3 def country_code @country_code end |
#country_name ⇒ Object
Returns the value of attribute country_name.
3 4 5 |
# File 'lib/country_info.rb', line 3 def country_name @country_name end |
#currency_code ⇒ Object
Returns the value of attribute currency_code.
5 6 7 |
# File 'lib/country_info.rb', line 5 def currency_code @currency_code end |
#fips_code ⇒ Object
Returns the value of attribute fips_code.
4 5 6 |
# File 'lib/country_info.rb', line 4 def fips_code @fips_code end |
#geoname_id ⇒ Object
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_3 ⇒ Object
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_numeric ⇒ Object
Returns the value of attribute iso_numeric.
3 4 5 |
# File 'lib/country_info.rb', line 3 def iso_numeric @iso_numeric end |
#population ⇒ Object
Returns the value of attribute population.
4 5 6 |
# File 'lib/country_info.rb', line 4 def population @population end |
Instance Method Details
#bounding_box ⇒ Object
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 |
#languages ⇒ Object
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 |