Skip to content

Instantly share code, notes, and snippets.

@guitsaru
Forked from logankoester/tournament.rb
Created June 28, 2011 15:48
Show Gist options
  • Save guitsaru/1051438 to your computer and use it in GitHub Desktop.
Save guitsaru/1051438 to your computer and use it in GitHub Desktop.
class Tournament < ActiveRecord::Base
include Bracket::Swiss # (OR Bracket::KOTH OR Bracket::SingleElimination etc)
end
module Bracket
module KOTH
def self.included(base)
base.workflow do
# state and events for a king of the hill tournament
end
end
end
module Swiss
def self.included(base)
base.workflow do
# state and events for a swiss tournament
end
end
end
module SingleElimination
def self.included(base)
base.workflow do
# state and events for a single elimination tournament
end
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment