Class: EloBrain::EloCalculations::Strategies

Inherits:
Object
  • Object
show all
Defined in:
lib/elo_brain/elo_calculations/strategies.rb

Constant Summary collapse

STRATEGIES_COLLECTION =
{
  winner: Winner,
  looser: Looser,
}.freeze

Instance Method Summary collapse

Instance Method Details

#call(strategy:) ⇒ Object



11
12
13
# File 'lib/elo_brain/elo_calculations/strategies.rb', line 11

def call(strategy:)
  STRATEGIES_COLLECTION[strategy.to_sym].new
end