A Document containing lists, headings, paragraphs, etc.
Creates a new Document with parts
# File lib/rdoc/markup/document.rb, line 14
14: def initialize *parts
15: @parts = []
16: @parts.push(*parts)
17: end
Appends part to the document
# File lib/rdoc/markup/document.rb, line 22
22: def << part
23: case part
24: when RDoc::Markup::Document then
25: unless part.empty? then
26: parts.push(*part.parts)
27: parts << RDoc::Markup::BlankLine.new
28: end
29: when String then
30: raise ArgumentError,
31: "expected RDoc::Markup::Document and friends, got String" unless
32: part.empty?
33: else
34: parts << part
35: end
36: end
# File lib/rdoc/markup/document.rb, line 42
42: def accept visitor
43: visitor.start_accepting
44:
45: @parts.each do |item|
46: item.accept visitor
47: end
48:
49: visitor.end_accepting
50: end
Disabled; run with --debug to generate this.
Generated with the Darkfish Rdoc Generator 1.1.6.