method
add
![Some documentation Importance_1](https://d2vfyqvduarcvs.cloudfront.net/images/importance_1.png?1349367920)
add(element=nil)
public
Adds an element
element |
if supplied, is either an Element, String, or Source (see Element.initialize). If not supplied or nil, a new, default Element will be constructed |
Returns |
the added Element |
a = Element.new('a') a.elements.add(Element.new('b')) #-> <a><b/></a> a.elements.add('c') #-> <a><b/><c/></a>