Class: Bet
Defined Under Namespace
Modules: ExpectedProfit
Instance Attribute Summary collapse
-
#odds ⇒ Object
Returns the value of attribute odds.
-
#wagered_amount ⇒ Object
Returns the value of attribute wagered_amount.
-
#win_chance ⇒ Object
Returns the value of attribute win_chance.
Instance Method Summary collapse
Methods included from ExpectedProfit
Instance Attribute Details
#odds ⇒ Object
Returns the value of attribute odds.
11 12 13 |
# File 'lib/odds/bet.rb', line 11 def odds @odds end |
#wagered_amount ⇒ Object
Returns the value of attribute wagered_amount.
11 12 13 |
# File 'lib/odds/bet.rb', line 11 def wagered_amount @wagered_amount end |
#win_chance ⇒ Object
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_profit ⇒ Object
18 19 20 |
# File 'lib/odds/bet.rb', line 18 def potential_profit odds.win_amount_without_principal * wagered_amount.to_f end |