Class: Bagel::Tennis::Stats::PointsWon
- Defined in:
- lib/bagel/tennis/stats/points_won.rb
Instance Attribute Summary collapse
-
#p1 ⇒ Object
readonly
Returns the value of attribute p1.
-
#p2 ⇒ Object
readonly
Returns the value of attribute p2.
Attributes inherited from Stat
Instance Method Summary collapse
Methods inherited from Stat
Constructor Details
This class inherits a constructor from Bagel::Tennis::Stats::Stat
Instance Attribute Details
#p1 ⇒ Object (readonly)
Returns the value of attribute p1.
3 4 5 |
# File 'lib/bagel/tennis/stats/points_won.rb', line 3 def p1 @p1 end |
#p2 ⇒ Object (readonly)
Returns the value of attribute p2.
3 4 5 |
# File 'lib/bagel/tennis/stats/points_won.rb', line 3 def p2 @p2 end |
Instance Method Details
#name ⇒ Object
5 6 7 |
# File 'lib/bagel/tennis/stats/points_won.rb', line 5 def name 'POINTS WON' end |
#superior ⇒ Object
13 14 15 |
# File 'lib/bagel/tennis/stats/points_won.rb', line 13 def superior [ p1 > p2, p2 > p1 ] end |
#values ⇒ Object
9 10 11 |
# File 'lib/bagel/tennis/stats/points_won.rb', line 9 def values [ p1, p2 ] end |