class OctoRanker::Repository
Public Class Methods
new(stars)
click to toggle source
# File lib/octo_ranker/repository.rb, line 3 def initialize(stars) @stars = stars end
Public Instance Methods
weight()
click to toggle source
Defines how heavily a repository should be counted when determining scores for a user. Currently defined to be the number of stars on the repository (plus 1, because users should still get points for contributing, even if the repo has no stars).
# File lib/octo_ranker/repository.rb, line 11 def weight @stars + 1 end