Parent

RDoc::Markup::Document

A Document containing lists, headings, paragraphs, etc.

Attributes

parts[R]

The parts of the Document

Public Class Methods

new(*parts) click to toggle source

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

Public Instance Methods

<<(part) click to toggle source

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
accept(visitor) click to toggle source
    # 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
empty?() click to toggle source
    # File lib/rdoc/markup/document.rb, line 52
52:   def empty?
53:     @parts.empty?
54:   end
push(*parts) click to toggle source

Appends parts to the document

    # File lib/rdoc/markup/document.rb, line 67
67:   def push *parts
68:     self.parts.push(*parts)
69:   end

Disabled; run with --debug to generate this.

[Validate]

Generated with the Darkfish Rdoc Generator 1.1.6.