Class: Parlay

Inherits:
Object
  • Object
show all
Includes:
Bet::ExpectedProfit, FromHash
Defined in:
lib/odds/parlay.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Bet::ExpectedProfit

#expected_profit

Instance Attribute Details

#wagered_amountObject

Returns the value of attribute wagered_amount.



4
5
6
# File 'lib/odds/parlay.rb', line 4

def wagered_amount
  @wagered_amount
end

Instance Method Details

#oddsObject



7
8
9
# File 'lib/odds/parlay.rb', line 7

def odds
  bets.map { |x| x.odds }.times_product
end

#win_chanceObject



11
12
13
# File 'lib/odds/parlay.rb', line 11

def win_chance
  bets.map { |x| x.win_chance }.times_product
end