Class: Jumbotron::Services::Public::MapPublicCurrentLines

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

Instance Method Summary collapse

Instance Method Details

#callObject



9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
# File 'app/services/jumbotron/services/public/map_public_current_lines.rb', line 9

def call
  context.public_current_lines = Array(current_lines).map do |line|
    Jumbotron::Public::CurrentLine.new(
      game_id: line.game_id,
      bookmaker_id: line.bookmaker_id,
      bookmaker_name: line.bookmaker_name,
      market: line.market,
      outcome: line.outcome,
      line_value: line.line_value,
      price_american: line.price_american,
      observed_at: line.observed_at,
      changed_at: line.changed_at
    )
  end
end