table_of_contents()
Returns an Array of headings in the document.
Require ‘rdoc/markup/formatter’ before calling this method.
# File lib/rdoc/markup/document.rb, line 159 def table_of_contents accept RDoc::Markup::ToTableOfContents.to_toc end