class Geocoder::Result::MaxmindLocal
Public Class Methods
response_attributes()
click to toggle source
# File lib/geocoder/results/maxmind_local.rb, line 34 def self.response_attributes %w[ip] end
Public Instance Methods
city()
click to toggle source
# File lib/geocoder/results/maxmind_local.rb, line 10 def city @data[:city_name] end
coordinates()
click to toggle source
# File lib/geocoder/results/maxmind_local.rb, line 6 def coordinates [@data[:latitude], @data[:longitude]] end
country()
click to toggle source
# File lib/geocoder/results/maxmind_local.rb, line 22 def country @data[:country_name] end
country_code()
click to toggle source
# File lib/geocoder/results/maxmind_local.rb, line 26 def country_code @data[:country_code2] end
postal_code()
click to toggle source
# File lib/geocoder/results/maxmind_local.rb, line 30 def postal_code @data[:postal_code] end
state()
click to toggle source
# File lib/geocoder/results/maxmind_local.rb, line 14 def state @data[:region_name] end
state_code()
click to toggle source
# File lib/geocoder/results/maxmind_local.rb, line 18 def state_code "" # Not available in Maxmind's database end