Extended maintenance of Ruby 1.9.3 ended on February 23, 2015. Read more
A List of ListItems
Appends item to the list
# File rdoc/markup/list.rb, line 28
def << item
@items << item
end
Runs this list and all its items
through visitor
# File rdoc/markup/list.rb, line 41
def accept visitor
visitor.accept_list_start self
@items.each do |item|
item.accept visitor
end
visitor.accept_list_end self
end
Is the list empty?
# File rdoc/markup/list.rb, line 54
def empty?
@items.empty?
end