Class: Bagel::Tennis::Stats::BreakPointsWon

Inherits:
Stat
  • Object
show all
Defined in:
lib/bagel/tennis/stats/break_points_won.rb

Instance Attribute Summary collapse

Attributes inherited from Stat

#points

Instance Method Summary collapse

Methods inherited from Stat

#initialize

Constructor Details

This class inherits a constructor from Bagel::Tennis::Stats::Stat

Instance Attribute Details

#p1_labelObject (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_percentageObject (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_labelObject (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_percentageObject (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

#nameObject



5
6
7
# File 'lib/bagel/tennis/stats/break_points_won.rb', line 5

def name
  'BREAK POINTS WON'
end

#superiorObject



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

#valuesObject



9
10
11
# File 'lib/bagel/tennis/stats/break_points_won.rb', line 9

def values
  [ p1_label, p2_label ]
end