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