Class: Jumbotron::Services::Canonical::ResolveCurrentLines

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

Instance Method Summary collapse

Instance Method Details

#callObject



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

def call
  resolved = ResolveCurrentLinesForGames.call(game_ids: [game.id])
  unless resolved.success?
    context.fail!(application_error: resolved.errors.first)
    return
  end

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