lib/google_custom_search.rb
##
# Query Google, and make sure it responds.
#
Query Google, and make sure it responds.
Query Google and make sure it responds .
def fetch_xml(url)
    begin
      resp = nil
      timeout(3) do
        resp = Net::HTTP.get_response(URI.parse(url))
      end
    rescue SocketError, TimeoutError; end
    (resp and resp.code == "200") ? resp.body : nil
  end
def fetch_xml ( url ) begin resp = nil timeout ( 3 ) do resp = Net :: HTTP . get_response ( URI . parse ( url ) ) end rescue SocketError , TimeoutError ; end ( resp and resp . code == "200" ) ? resp . body : nil end
Query Google, and make sure it responds.
Query Google and make sure it responds .
url
<not_specific>