Class: Jumbotron::Services::Canonical::DeriveConsensusForGames
- Inherits:
-
CommandTower::Services::ApplicationService
- Object
- CommandTower::Services::ApplicationService
- Jumbotron::Services::Canonical::DeriveConsensusForGames
- Defined in:
- app/services/jumbotron/services/canonical/derive_consensus_for_games.rb
Instance Method Summary collapse
Instance Method Details
#call ⇒ Object
9 10 11 12 13 14 |
# File 'app/services/jumbotron/services/canonical/derive_consensus_for_games.rb', line 9 def call grouped = Array(current_lines).group_by(&:game_id) context.consensus_lines = grouped.flat_map do |game_id, lines| DeriveConsensusLine.from_current_lines(game_id: game_id, current_lines: lines) end end |