Method: Geocoder::Query#lookup

Defined in:
lib/geocoder/query.rb

#lookupObject

Get a Lookup object (which communicates with the remote geocoding API) appropriate to the Query text.



34
35
36
37
38
39
40
41
# File 'lib/geocoder/query.rb', line 34

def lookup
  if !options[:street_address] and (options[:ip_address] or ip_address?)
    name = options[:ip_lookup] || Configuration.ip_lookup || Geocoder::Lookup.ip_services.first
  else
    name = options[:lookup] || Configuration.lookup || Geocoder::Lookup.street_services.first
  end
  Lookup.get(name)
end