class XML::DOM::Comment
begin¶ ↑
Class XML::DOM::Comment¶ ↑
superclass¶ ↑
end¶ ↑
begin¶ ↑
Class XML::DOM::Comment¶ ↑
superclass¶ ↑
end¶ ↑
Public Class Methods
new(text = nil)
click to toggle source
begin¶ ↑
Class Methods¶ ↑
Calls superclass method
XML::DOM::CharacterData.new
# File lib/xml/dom/core.rb, line 2588 def initialize(text = nil) super(text) raise "parameter error" if !text end
Public Instance Methods
_getMyLocation(parent)
click to toggle source
# File lib/xml/dom/core.rb, line 2638 def _getMyLocation(parent) index = 1 parent.childNodes do |child| if child == self return "child(#{index},#comment)" end if child.nodeType == COMMENT_NODE index += 1 end end nil end
_getMyLocationInXPath(parent)
click to toggle source
# File lib/xml/dom2/xpath.rb, line 364 def _getMyLocationInXPath(parent) n = parent.childNodes.to_a.select { |i| i.nodeType == COMMENT_NODE }.index(self) "comment()[#{n + 1}]" end
dump(depth = 0)
click to toggle source
nodeName()
click to toggle source
nodeType()
click to toggle source