class Popularity::Github
Public Instance Methods
stars()
click to toggle source
# File lib/popularity/networks/github.rb, line 5 def stars response_json.size end
valid?()
click to toggle source
# File lib/popularity/networks/github.rb, line 9 def valid? host == 'github.com' end
Protected Instance Methods
request_url()
click to toggle source
# File lib/popularity/networks/github.rb, line 15 def request_url parts = @url.split("/").last(2) repo = parts.last owner = parts.first "https://api.github.com/repos/#{owner}/#{repo}/stargazers" end