class MatchPlay::CompleteSetAndMatch
Class to help with completing a set and the match. A set or the match may be completed when there is a winner.
Public Class Methods
new(match)
click to toggle source
-
Args
-
match
-> Match
-
# File app/models/concerns/match_play.rb, line 667 def initialize(match) @match = match end
Public Instance Methods
complete!()
click to toggle source
Complete the current set if enough games have been won. Then, complete the match if enough sets have been won.
# File app/models/concerns/match_play.rb, line 673 def complete! complete_set_play! if complete_set? complete_match_tiebreak! if complete_match_tiebreak? complete_play! if complete_play? end