class Geocoder::Lookup::Base

def search(query, *args)


for reverse geocoding. Returns an array of Geocoder::Results.
"205.128.54.202") for geocoding, or coordinates (latitude, longitude)
Takes a search string (eg: "Mississippi Coast Coliseumf, Biloxi, MS",

Returns +nil+ on timeout or error.
Query the geocoding API and return a Geocoder::Result object.
#
def search(query, *args)
  # convert coordinates as separate arguments to an array
  if query.is_a?(Numeric) and args.first.is_a?(Numeric)
    warn "DEPRECATION WARNING: Instead of passing latitude/longitude as separate arguments to the search method, please pass an array: [#{query},#{args.first}]. The old argument format will not be supported in Geocoder v.1.0."
    query = [query, args.first]
  end
  # if coordinates given as string, turn into array
  query = query.split(/\s*,\s*/) if coordinates?(query)
  if query.is_a?(Array)
    reverse = true
    query = query.join(',')
  else
    reverse = false
  end
  results(query, reverse).map{ |r| result_class.new(r) }
end