Class: Merit::RankRules

Inherits:
Object
  • Object
show all
Includes:
RankRulesMethods
Defined in:
lib/generators/merit/templates/merit_rank_rules.rb

Instance Method Summary collapse

Methods included from RankRulesMethods

#check_rank_rules, #defined_rules, #set_rank

Constructor Details

#initializeRankRules

Returns a new instance of RankRules


17
18
19
20
21
22
23
24
25
26
27
28
29
# File 'lib/generators/merit/templates/merit_rank_rules.rb', line 17

def initialize
  # set_rank :level => 1, :to => Commiter.active do |commiter|
  #   commiter.repositories.count > 1 && commiter.followers >= 10
  # end
  #
  # set_rank :level => 2, :to => Commiter.active do |commiter|
  #   commiter.branches.count > 1 && commiter.followers >= 10
  # end
  #
  # set_rank :level => 3, :to => Commiter.active do |commiter|
  #   commiter.branches.count > 2 && commiter.followers >= 20
  # end
end