mirror of
https://github.com/jcwimer/wrestlingApp
synced 2026-04-03 21:33:48 +00:00
14 lines
359 B
Ruby
14 lines
359 B
Ruby
class AdvanceWrestler
|
|
def initialize( wrestler )
|
|
@wrestler = wrestler
|
|
@tournament = @wrestler.tournament
|
|
end
|
|
|
|
def advance
|
|
PoolAdvance.new(@wrestler,@wrestler.lastMatch).advanceWrestler if @tournament.tournament_type == "Pool to bracket"
|
|
end
|
|
if Rails.env.production?
|
|
handle_asynchronously :advance
|
|
end
|
|
|
|
end |