Class: EloRankable::EloRanking
- Inherits:
-
ActiveRecord::Base
- Object
- ActiveRecord::Base
- EloRankable::EloRanking
- Defined in:
- lib/elo_rankable/elo_ranking.rb
Instance Method Summary collapse
-
#initialize(attributes = nil) ⇒ EloRanking
constructor
A new instance of EloRanking.
- #k_factor ⇒ Object
Constructor Details
#initialize(attributes = nil) ⇒ EloRanking
Returns a new instance of EloRanking.
13 14 15 16 17 |
# File 'lib/elo_rankable/elo_ranking.rb', line 13 def initialize(attributes = nil) super self. ||= EloRankable.config. self.games_played ||= 0 end |
Instance Method Details
#k_factor ⇒ Object
19 20 21 |
# File 'lib/elo_rankable/elo_ranking.rb', line 19 def k_factor EloRankable.config.k_factor_for() end |