Class REXML::Attribute
In: lib/xmpp4r/rexmladdons.rb
Parent: Object
XMLTokens XPathParser Text IOSource Attribute Element lib/xmpp4r/rexmladdons.rb REXML dot/m_64_0.png

Methods

new  

Public Class methods

[Source]

     # File lib/xmpp4r/rexmladdons.rb, line 864
864:                 def initialize( first, second=nil, parent=nil )
865:                         @normalized = @unnormalized = @element = nil
866:                         if first.kind_of? Attribute
867:                                 self.name = first.expanded_name
868:                                 @value = first.value
869:                                 if second.kind_of? Element
870:                                         @element = second
871:                                 else
872:                                         @element = first.element
873:                                 end
874:                         elsif first.kind_of? String
875:                                 @element = parent if parent.kind_of? Element
876:                                 self.name = first
877:                                 @value = Text::normalize(second.to_s)
878:                         else
879:                                 raise "illegal argument #{first.class.name} to Attribute constructor"
880:                         end
881:                 end

[Validate]