Class: Jumbotron::Services::Public::ResolveCurrentLinesForGames

Inherits:
CommandTower::Services::ApplicationService
  • Object
show all
Defined in:
app/services/jumbotron/services/public/resolve_current_lines_for_games.rb

Instance Method Summary collapse

Instance Method Details

#callObject



9
10
11
12
13
14
15
16
17
# File 'app/services/jumbotron/services/public/resolve_current_lines_for_games.rb', line 9

def call
  resolved = Canonical::ResolveCurrentLinesForGames.call(game_ids: Array(games).map(&:id))
  unless resolved.success?
    context.fail!(application_error: resolved.errors.first)
    return
  end

  context.current_lines = Array(resolved.data[:current_lines])
end