size()
public
Returns the number of Element
children of the parent object.
doc = Document.new '<a>sean<b/>elliott<b/>russell<b/></a>'
doc.root.size
doc.root.elements.size
Show source
def size
count = 0
@element.each {|child| count+=1 if child.kind_of? Element }
count
end