Class: GeoIP::City
- Inherits:
-
Struct
- Object
- Struct
- GeoIP::City
- Defined in:
- lib/geoip.rb
Overview
Warning: for historical reasons the region code is mis-named region_name here
Instance Attribute Summary collapse
-
#area_code ⇒ Object
Returns the value of attribute area_code.
-
#city_name ⇒ Object
Returns the value of attribute city_name.
-
#continent_code ⇒ Object
Returns the value of attribute continent_code.
-
#country_code2 ⇒ Object
Returns the value of attribute country_code2.
-
#country_code3 ⇒ Object
Returns the value of attribute country_code3.
-
#country_name ⇒ Object
Returns the value of attribute country_name.
-
#dma_code ⇒ Object
Returns the value of attribute dma_code.
-
#ip ⇒ Object
Returns the value of attribute ip.
-
#latitude ⇒ Object
Returns the value of attribute latitude.
-
#longitude ⇒ Object
Returns the value of attribute longitude.
-
#postal_code ⇒ Object
Returns the value of attribute postal_code.
-
#real_region_name ⇒ Object
Returns the value of attribute real_region_name.
-
#region_name ⇒ Object
Returns the value of attribute region_name.
-
#request ⇒ Object
Returns the value of attribute request.
-
#timezone ⇒ Object
Returns the value of attribute timezone.
Instance Method Summary collapse
Instance Attribute Details
#area_code ⇒ Object
Returns the value of attribute area_code
134 135 136 |
# File 'lib/geoip.rb', line 134 def area_code @area_code end |
#city_name ⇒ Object
Returns the value of attribute city_name
134 135 136 |
# File 'lib/geoip.rb', line 134 def city_name @city_name end |
#continent_code ⇒ Object
Returns the value of attribute continent_code
134 135 136 |
# File 'lib/geoip.rb', line 134 def continent_code @continent_code end |
#country_code2 ⇒ Object
Returns the value of attribute country_code2
134 135 136 |
# File 'lib/geoip.rb', line 134 def country_code2 @country_code2 end |
#country_code3 ⇒ Object
Returns the value of attribute country_code3
134 135 136 |
# File 'lib/geoip.rb', line 134 def country_code3 @country_code3 end |
#country_name ⇒ Object
Returns the value of attribute country_name
134 135 136 |
# File 'lib/geoip.rb', line 134 def country_name @country_name end |
#dma_code ⇒ Object
Returns the value of attribute dma_code
134 135 136 |
# File 'lib/geoip.rb', line 134 def dma_code @dma_code end |
#ip ⇒ Object
Returns the value of attribute ip
134 135 136 |
# File 'lib/geoip.rb', line 134 def ip @ip end |
#latitude ⇒ Object
Returns the value of attribute latitude
134 135 136 |
# File 'lib/geoip.rb', line 134 def latitude @latitude end |
#longitude ⇒ Object
Returns the value of attribute longitude
134 135 136 |
# File 'lib/geoip.rb', line 134 def longitude @longitude end |
#postal_code ⇒ Object
Returns the value of attribute postal_code
134 135 136 |
# File 'lib/geoip.rb', line 134 def postal_code @postal_code end |
#real_region_name ⇒ Object
Returns the value of attribute real_region_name
134 135 136 |
# File 'lib/geoip.rb', line 134 def real_region_name @real_region_name end |
#region_name ⇒ Object
Returns the value of attribute region_name
134 135 136 |
# File 'lib/geoip.rb', line 134 def region_name @region_name end |
#request ⇒ Object
Returns the value of attribute request
134 135 136 |
# File 'lib/geoip.rb', line 134 def request @request end |
#timezone ⇒ Object
Returns the value of attribute timezone
134 135 136 |
# File 'lib/geoip.rb', line 134 def timezone @timezone end |
Instance Method Details
#region_code ⇒ Object
141 142 143 |
# File 'lib/geoip.rb', line 141 def region_code self.region_name end |
#to_hash ⇒ Object
137 138 139 |
# File 'lib/geoip.rb', line 137 def to_hash Hash[each_pair.to_a] end |