class Parent
Extends Child
Includes Enumerable
A parent has children, and has methods for accessing them. The Parent class is never encountered except as the superclass for some other object.
Methods
Aliases
push
is a synonym for
add
<<
is a synonym for
push
each_child
is a synonym for
each
Methods
[]
Fetches a child at a given index
[]=
Returns
the parent (self)
Set an index entry. See Array.[]= @return the parent (self)
index
Returns
the index of the child, or nil if the object is not a child of this parent.
Fetches the index of a given child
insert_after
Returns
the parent (self)
Inserts an child after another child @return the parent (self)
insert_before
Returns
the parent (self)
Inserts an child before another child @return the parent (self)
replace_child
Replaces one child with another, making sure the nodelist is correct
size
Returns
the number of children of this parent