class Gemsearch::Fetcher

Constants

RUBYGEMS_SEARCH_URL

Public Instance Methods

fetch(query) click to toggle source
# File lib/gemsearch/fetcher.rb, line 9
def fetch(query)
  JSON.parse(open("#{RUBYGEMS_SEARCH_URL}?query=#{CGI.escape(query)}").read)
rescue OpenURI::HTTPError
  []
end