Class: Canon::Xml::Nodes::ProcessingInstructionNode

Inherits:
Canon::Xml::Node show all
Defined in:
lib/canon/xml/nodes/processing_instruction_node.rb

Overview

Processing Instruction node in the XPath data model

Instance Attribute Summary collapse

Attributes inherited from Canon::Xml::Node

#children, #parent

Instance Method Summary collapse

Methods inherited from Canon::Xml::Node

#add_child, #in_node_set=, #in_node_set?

Constructor Details

#initialize(target:, data: "") ⇒ ProcessingInstructionNode

Returns a new instance of ProcessingInstructionNode.



12
13
14
15
16
# File 'lib/canon/xml/nodes/processing_instruction_node.rb', line 12

def initialize(target:, data: "")
  super()
  @target = target
  @data = data
end

Instance Attribute Details

#dataObject (readonly)

Returns the value of attribute data.



10
11
12
# File 'lib/canon/xml/nodes/processing_instruction_node.rb', line 10

def data
  @data
end

#targetObject (readonly)

Returns the value of attribute target.



10
11
12
# File 'lib/canon/xml/nodes/processing_instruction_node.rb', line 10

def target
  @target
end

Instance Method Details

#node_typeObject



18
19
20
# File 'lib/canon/xml/nodes/processing_instruction_node.rb', line 18

def node_type
  :processing_instruction
end