Class: MaxMindDB::Result::Location

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

Instance Method Summary collapse

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_radiusObject



24
25
26
# File 'lib/maxminddb/result/location.rb', line 24

def accuracy_radius
  raw['accuracy_radius']
end

#latitudeObject



8
9
10
# File 'lib/maxminddb/result/location.rb', line 8

def latitude
  raw['latitude']
end

#longitudeObject



12
13
14
# File 'lib/maxminddb/result/location.rb', line 12

def longitude
  raw['longitude']
end

#metro_codeObject



16
17
18
# File 'lib/maxminddb/result/location.rb', line 16

def metro_code
  raw['metro_code']
end

#time_zoneObject



20
21
22
# File 'lib/maxminddb/result/location.rb', line 20

def time_zone
  raw['time_zone']
end