Parent

RDoc::Markup::ListItem

An item within a List that contains paragraphs, headings, etc.

Attributes

label[RW]

The label for the ListItem

parts[R]

Parts of the ListItem

Public Class Methods

new(label = nil, *parts) click to toggle source

Creates a new ListItem with an optional label containing parts

    # File lib/rdoc/markup/list_item.rb, line 19
19:   def initialize label = nil, *parts
20:     @label = label
21:     @parts = []
22:     @parts.push(*parts)
23:   end

Public Instance Methods

<<(part) click to toggle source

Appends part to the ListItem

    # File lib/rdoc/markup/list_item.rb, line 28
28:   def << part
29:     @parts << part
30:   end
accept(visitor) click to toggle source
    # File lib/rdoc/markup/list_item.rb, line 38
38:   def accept visitor
39:     visitor.accept_list_item_start self
40: 
41:     @parts.each do |part|
42:       part.accept visitor
43:     end
44: 
45:     visitor.accept_list_item_end self
46:   end
empty?() click to toggle source

Is the ListItem empty?

    # File lib/rdoc/markup/list_item.rb, line 51
51:   def empty?
52:     @parts.empty?
53:   end
length() click to toggle source

Length of parts in the ListItem

    # File lib/rdoc/markup/list_item.rb, line 58
58:   def length
59:     @parts.length
60:   end
push(*parts) click to toggle source

Adds parts to the ListItem

    # File lib/rdoc/markup/list_item.rb, line 78
78:   def push *parts
79:     @parts.push(*parts)
80:   end

Disabled; run with --debug to generate this.

[Validate]

Generated with the Darkfish Rdoc Generator 1.1.6.