Module: Polytrix::Documentation::ViewHelper
- Defined in:
- lib/polytrix/documentation/view_helper.rb
Instance Method Summary collapse
Instance Method Details
#polytrix_toc ⇒ Object
4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 |
# File 'lib/polytrix/documentation/view_helper.rb', line 4 def polytrix_toc buffer = StringIO.new buffer.puts '<ul>' Polytrix.manifest.suites.each do |suite_name, suite| buffer.puts "<li>#{suite_name}</li>" buffer.puts '<ul>' suite.samples.each do |challenge_name| buffer.puts "<li>#{challenge_name}</li>" end buffer.puts '</ul>' end buffer.puts '</ul>' buffer.string end |