An item within a List that contains paragraphs, headings, etc.
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
Appends part to the ListItem
# File lib/rdoc/markup/list_item.rb, line 28
28: def << part
29: @parts << part
30: end
# 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
Is the ListItem empty?
# File lib/rdoc/markup/list_item.rb, line 51
51: def empty?
52: @parts.empty?
53: end
Length of parts in the ListItem
# File lib/rdoc/markup/list_item.rb, line 58
58: def length
59: @parts.length
60: end
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.
Generated with the Darkfish Rdoc Generator 1.1.6.