new( first, second=nil, parent=nil )
Class Public methods
Constructor. FIXME: The parser doesn't catch illegal characters in attributes
- first
-
Either: an Attribute, which this new attribute will become a clone of; or a String, which is the name of this attribute
- second
-
If
first
is an Attribute, then this may be an Element, or nil. If nil, then the Element parent of this attribute is the parent of thefirst
Attribute. If the first argument is a String, then this must also be a String, and is the content of the attribute. If this is the content, it must be fully normalized (contain no illegal characters). - parent
-
Ignored unless
first
is a String; otherwise, may be the Element parent of this attribute, or nil.
Attribute.new( attribute_to_clone ) Attribute.new( attribute_to_clone, parent_element ) Attribute.new( "attr", "attr_value" ) Attribute.new( "attr", "attr_value", parent_element )
Please login to continue.