Parent

RDoc::Markup::List

A List of ListItems

Attributes

type[RW]

The list’s type

items[R]

Items in the list

Public Class Methods

new(type = nil, *items) click to toggle source

Creates a new list of type with items

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

Public Instance Methods

<<(item) click to toggle source

Appends item to the list

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

Is the list empty?

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

Returns the last item in the list

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

Appends items to the list

    # File lib/rdoc/markup/list.rb, line 73
73:   def push *items
74:     @items.push(*items)
75:   end

Disabled; run with --debug to generate this.

[Validate]

Generated with the Darkfish Rdoc Generator 1.1.6.