Class: XMLScan::XPath::DOM::AttrNodeAdapter

Inherits:
AbstractNodeAdapter show all
Defined in:
lib/xml/dom2/xpath.rb

Instance Attribute Summary

Attributes inherited from AbstractNodeAdapter

#node

Instance Method Summary collapse

Methods inherited from AbstractNodeAdapter

#children, #each_following_siblings, #each_preceding_siblings, #lang, #root

Instance Method Details

#indexObject



204
205
206
# File 'lib/xml/dom2/xpath.rb', line 204

def index
  -@visitor.get_attributes(parent).index(@node)
end

#name_localpartObject



188
189
190
# File 'lib/xml/dom2/xpath.rb', line 188

def name_localpart
  @node.nodeName
end

#namespace_uriObject



192
193
194
# File 'lib/xml/dom2/xpath.rb', line 192

def namespace_uri
  @node.namespaceURI
end

#node_typeObject



184
185
186
# File 'lib/xml/dom2/xpath.rb', line 184

def node_type
  :attribute
end

#parentObject



200
201
202
# File 'lib/xml/dom2/xpath.rb', line 200

def parent
  @visitor.get_attr_parent @node
end

#qualified_nameObject



196
197
198
# File 'lib/xml/dom2/xpath.rb', line 196

def qualified_name
  @node.nodeName
end

#string_valueObject



208
209
210
# File 'lib/xml/dom2/xpath.rb', line 208

def string_value
  @node.nodeValue
end

#wrap(node, visitor) ⇒ Object



178
179
180
181
182
# File 'lib/xml/dom2/xpath.rb', line 178

def wrap(node, visitor)
  @node = node
  @visitor = visitor
  self
end