mirror of
https://github.com/jcwimer/wrestlingApp
synced 2026-03-24 17:04:43 +00:00
Code is repeated in the following classes: GenerateTournamentMatches PoolToBracketMatchGeneration PoolToBracketGenerateLoserNames WipeTournamentMatches
23 lines
434 B
Ruby
23 lines
434 B
Ruby
class WipeTournamentMatches
|
|
|
|
def initialize( tournament )
|
|
@tournament = tournament
|
|
end
|
|
|
|
def setUpMatchGeneration
|
|
wipeMatches
|
|
resetSchoolScores
|
|
end
|
|
|
|
def wipeWeightMatches(weight)
|
|
weight.matches.destroy_all
|
|
end
|
|
|
|
def wipeMatches
|
|
@tournament.matches.destroy_all
|
|
end
|
|
|
|
def resetSchoolScores
|
|
@tournament.schools.update_all("score = 0.0")
|
|
end
|
|
end |