class Geocoder::Query

def coordinates?


Does the given string look like latitude/longitude coordinates?
#
def coordinates?
  text.is_a?(Array) or (
    text.is_a?(String) and
    !!text.to_s.match(/\A-?[0-9\.]+, *-?[0-9\.]+\z/)
  )
end