class Ultraquiz::Ultraquiz
Public Instance Methods
popular()
click to toggle source
# File lib/ultraquiz.rb, line 7 def popular gems = GemsClient.new gems.search '' end
putsAsCsv(data)
click to toggle source
# File lib/ultraquiz.rb, line 25 def putsAsCsv(data) csv_string = CSV.generate do |csv| data.each do |row| csv << [ row["name"], row["downloads"], row["version"], row["version_downloads"], row["authors"] ] end end end
searchAll(query)
click to toggle source
# File lib/ultraquiz.rb, line 12 def searchAll(query) gems = GemsClient.new matched = [] page = 1 while true response = gems.search(query, page) break if response.empty? page += 1 matched += response end matched end