Class: Bet

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

Defined Under Namespace

Modules: ExpectedProfit

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from ExpectedProfit

#expected_profit

Instance Attribute Details

#oddsObject

Returns the value of attribute odds.



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

def odds
  @odds
end

#wagered_amountObject

Returns the value of attribute wagered_amount.



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

def wagered_amount
  @wagered_amount
end

#win_chanceObject

Returns the value of attribute win_chance.



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

def win_chance
  @win_chance
end

Instance Method Details

#potential_profitObject



18
19
20
# File 'lib/odds/bet.rb', line 18

def potential_profit
  odds.win_amount_without_principal * wagered_amount.to_f
end