class Geocoder::Lookup::MaxmindGeoip2

def results(query)

def results(query)
  # don't look up a loopback or private address, just return the stored result
  return [] if query.internal_ip_address?
  doc = fetch_data(query)
  if doc
    if !data_contains_error?(doc)
      return [doc]
    else
      Geocoder.log(:warn, "MaxMind GeoIP2 Geocoding API error: #{doc['code']} (#{doc['error']}).")
    end
  end
  return []
end