A section of documentation like:
Sections can be referenced multiple times and will be collapsed into a single section.
Attributes Public Class Methods Sourcedef initialize(parent, title, comment) @parent = parent @title = title ? title.strip : title @comments = [] add_comment comment end
Creates a new section with title
and comment
def ==(other) self.class === other and @title == other.title end
Sections are equal when they have the same title
def aref title = @title || '[untitled]' CGI.escape(title).gsub('%', '-').sub(/^-/, '') end
Anchor reference for linking to this section
Sourcedef in_files @comments.map(&:file) end
The files comments in this section come from
Sourcedef marshal_dump [ MARSHAL_VERSION, @title, parse, ] end
Serializes this Section
. The title and parsed comment are saved, but not the section parent which must be restored manually.
def marshal_load(array) @parent = nil @title = array[1] @comments = array[2].parts.map { |doc| RDoc::Comment.from_document(doc) } end
De-serializes this Section
. The section parent must be restored manually.
def parse RDoc::Markup::Document.new(*@comments.map(&:parse)) end
Parses comment_location
into an RDoc::Markup::Document
composed of multiple RDoc::Markup::Documents with their file set.
def plain_html @title || 'Top Section' end
The section’s title, or ‘Top Section’ if the title is nil.
This is used by the table of contents template so the name is silly.
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4