c45d32a37e
The methods XML::Element#add_attribute and XML::Element#set can be used to more easily add attributes to elements. The first method simply adds an Attribute instance and links it to the element. This allows for fine grained control over what data the attribute should contain. The second method ("set") simply sets an attribute based on a name and value, optionally creating the attribute if it doesn't already exist. |
||
---|---|---|
.. | ||
oga | ||
support | ||
spec_helper.rb |