class Geocoder::Lookup::Ip2location

def results(query)

def results(query)
  # don't look up a loopback or private address, just return the stored result
  return [reserved_result(query.text)] if query.internal_ip_address?
  return [] unless doc = fetch_data(query)
  if doc["response"] == "INVALID ACCOUNT"
    raise_error(Geocoder::InvalidApiKey) || Geocoder.log(:warn, "INVALID ACCOUNT")
    return []
  else
    return [doc]
  end
end