Class: Superbowl::Contestant
- Inherits:
-
Struct
- Object
- Struct
- Superbowl::Contestant
- Defined in:
- lib/superbowl/contestant.rb
Instance Attribute Summary collapse
-
#expected_payout ⇒ Object
Returns the value of attribute expected_payout.
-
#name ⇒ Object
Returns the value of attribute name.
-
#num_squares ⇒ Object
Returns the value of attribute num_squares.
Instance Method Summary collapse
Instance Attribute Details
#expected_payout ⇒ Object
Returns the value of attribute expected_payout
3 4 5 |
# File 'lib/superbowl/contestant.rb', line 3 def expected_payout @expected_payout end |
#name ⇒ Object
Returns the value of attribute name
3 4 5 |
# File 'lib/superbowl/contestant.rb', line 3 def name @name end |
#num_squares ⇒ Object
Returns the value of attribute num_squares
3 4 5 |
# File 'lib/superbowl/contestant.rb', line 3 def num_squares @num_squares end |
Instance Method Details
#expected_roi ⇒ Object
8 9 10 |
# File 'lib/superbowl/contestant.rb', line 8 def expected_roi 100 * (expected_payout - total_investment) / total_investment end |
#total_investment ⇒ Object
4 5 6 |
# File 'lib/superbowl/contestant.rb', line 4 def total_investment 10.0 * num_squares end |