Class: MaxMindDB::Result::Location
- Inherits:
-
Object
- Object
- MaxMindDB::Result::Location
- Defined in:
- lib/maxminddb/result/location.rb
Instance Method Summary collapse
- #accuracy_radius ⇒ Object
-
#initialize(raw) ⇒ Location
constructor
A new instance of Location.
- #latitude ⇒ Object
- #longitude ⇒ Object
- #metro_code ⇒ Object
- #time_zone ⇒ Object
Constructor Details
#initialize(raw) ⇒ Location
Returns a new instance of Location.
4 5 6 |
# File 'lib/maxminddb/result/location.rb', line 4 def initialize(raw) @raw = raw || {} end |
Instance Method Details
#accuracy_radius ⇒ Object
24 25 26 |
# File 'lib/maxminddb/result/location.rb', line 24 def accuracy_radius raw['accuracy_radius'] end |
#latitude ⇒ Object
8 9 10 |
# File 'lib/maxminddb/result/location.rb', line 8 def latitude raw['latitude'] end |
#longitude ⇒ Object
12 13 14 |
# File 'lib/maxminddb/result/location.rb', line 12 def longitude raw['longitude'] end |
#metro_code ⇒ Object
16 17 18 |
# File 'lib/maxminddb/result/location.rb', line 16 def metro_code raw['metro_code'] end |
#time_zone ⇒ Object
20 21 22 |
# File 'lib/maxminddb/result/location.rb', line 20 def time_zone raw['time_zone'] end |