Module: Playoffs::Bracketable
- Extended by:
- T::Helpers, T::Sig
- Included in:
- Tournament
- Defined in:
- lib/playoffs/tournament/bracketable.rb
Overview
Print out a basic, tree-based, text hierarchy of all series.
Instance Method Summary collapse
Instance Method Details
#championship ⇒ Object
13 |
# File 'lib/playoffs/tournament/bracketable.rb', line 13 def championship; end |
#print_bracket ⇒ Object
16 17 18 19 20 21 22 23 24 25 26 27 |
# File 'lib/playoffs/tournament/bracketable.rb', line 16 def print_bracket top_line = if championship.valid? && championship.over? championship.winner.to_s elsif championship.valid? 'TBD' else '!INVALID!' end ([top_line] + traverse_to_s(championship)).join("\n") end |