index( child )
public
Fetches the index of a given child
@param child the child to get the index of @return the index of the child, or nil if the
object is not a child of this parent.
Show source
def index( child )
count = -1
@children.find { |i| count += 1 ; i.hash == child.hash }
count
end