Skip to content
Snippets Groups Projects
Commit 21775d13 authored by Alex Reisner's avatar Alex Reisner
Browse files

Make method private.

parent b0324d2e
No related branches found
No related tags found
No related merge requests found
...@@ -16,13 +16,13 @@ module Geocoder::Lookup ...@@ -16,13 +16,13 @@ module Geocoder::Lookup
"#{protocol}://maps.googleapis.com/maps/api/geocode/json?" + url_query_string(query) "#{protocol}://maps.googleapis.com/maps/api/geocode/json?" + url_query_string(query)
end end
private # ---------------------------------------------------------------
def valid_response?(response) def valid_response?(response)
status = parse_json(response.body)["status"] status = parse_json(response.body)["status"]
super(response) and ['OK', 'ZERO_RESULTS'].include?(status) super(response) and ['OK', 'ZERO_RESULTS'].include?(status)
end end
private # ---------------------------------------------------------------
def results(query) def results(query)
return [] unless doc = fetch_data(query) return [] unless doc = fetch_data(query)
case doc['status']; when "OK" # OK status implies >0 results case doc['status']; when "OK" # OK status implies >0 results
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment