Class: Bagel::Tennis::Stats::BreakPointsWon
- Defined in:
- lib/bagel/tennis/stats/break_points_won.rb
Instance Attribute Summary collapse
-
#p1_label ⇒ Object
readonly
Returns the value of attribute p1_label.
-
#p1_percentage ⇒ Object
readonly
Returns the value of attribute p1_percentage.
-
#p2_label ⇒ Object
readonly
Returns the value of attribute p2_label.
-
#p2_percentage ⇒ Object
readonly
Returns the value of attribute p2_percentage.
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_label ⇒ Object (readonly)
Returns the value of attribute p1_label.
3 4 5 |
# File 'lib/bagel/tennis/stats/break_points_won.rb', line 3 def p1_label @p1_label end |
#p1_percentage ⇒ Object (readonly)
Returns the value of attribute p1_percentage.
3 4 5 |
# File 'lib/bagel/tennis/stats/break_points_won.rb', line 3 def p1_percentage @p1_percentage end |
#p2_label ⇒ Object (readonly)
Returns the value of attribute p2_label.
3 4 5 |
# File 'lib/bagel/tennis/stats/break_points_won.rb', line 3 def p2_label @p2_label end |
#p2_percentage ⇒ Object (readonly)
Returns the value of attribute p2_percentage.
3 4 5 |
# File 'lib/bagel/tennis/stats/break_points_won.rb', line 3 def p2_percentage @p2_percentage end |
Instance Method Details
#name ⇒ Object
5 6 7 |
# File 'lib/bagel/tennis/stats/break_points_won.rb', line 5 def name 'BREAK POINTS WON' end |
#superior ⇒ Object
13 14 15 |
# File 'lib/bagel/tennis/stats/break_points_won.rb', line 13 def superior [ p1_percentage > p2_percentage, p2_percentage > p1_percentage ] end |
#values ⇒ Object
9 10 11 |
# File 'lib/bagel/tennis/stats/break_points_won.rb', line 9 def values [ p1_label, p2_label ] end |