class XML::Smart::ProcessingInstruction

Public Class Methods

new(element) click to toggle source
# File lib/xml/smart_processinginstruction.rb, line 5
def initialize(element)
  @node = element
end

Public Instance Methods

==(other) click to toggle source
# File lib/xml/smart_processinginstruction.rb, line 33
def ==(other)
  return false unless other
  return false unless other.respond_to?(:unique_id)
  unique_id == other.unique_id
end
===(cls) click to toggle source
# File lib/xml/smart_processinginstruction.rb, line 9
def ===(cls); self.is_a? cls; end
content() click to toggle source
# File lib/xml/smart_processinginstruction.rb, line 23
def content; @node.content end
content=(t) click to toggle source
# File lib/xml/smart_processinginstruction.rb, line 24
def content=(t); @node.content = t.to_s if t.respond_to? :to_s; end
dump() click to toggle source
# File lib/xml/smart_processinginstruction.rb, line 11
def dump; @node.to_s; end
parent() click to toggle source
# File lib/xml/smart_processinginstruction.rb, line 26
def parent
  Dom::smart_helper(@node.parent)
end
parent?() click to toggle source
# File lib/xml/smart_processinginstruction.rb, line 29
def parent?; !@node.parent.nil?; end
path() click to toggle source
# File lib/xml/smart_processinginstruction.rb, line 31
def path; @node.path; end
qname() click to toggle source
# File lib/xml/smart_processinginstruction.rb, line 21
def qname; QName.new @node; end
replace_by(n) click to toggle source
# File lib/xml/smart_processinginstruction.rb, line 13
def replace_by(n)
  case n
    when ProcessingInstruction; ProcessingInstruction.new @node.replace(n.instance_variable_get(:@node))
    else
      nil
  end
end
unique_id() click to toggle source
# File lib/xml/smart_processinginstruction.rb, line 38
def unique_id; @node.pointer_id; end