class EloBrain::Players::Player

Public Class Methods

from(elo:, nb_matches:, situation:) click to toggle source
# File lib/elo_brain/players/player.rb, line 10
def self.from(elo:, nb_matches:, situation:)
  new(
    elo: elo,
    nb_matches: nb_matches,
    situation: situation
  )
end
from_contract(contract:) click to toggle source
# File lib/elo_brain/players/player.rb, line 18
def self.from_contract(contract:)
  new(
    elo: contract[:elo],
    nb_matches: contract[:nb_matches],
    situation: contract[:situation]
  )
end