Class: Canon::Xml::Nodes::ProcessingInstructionNode
- Inherits:
-
Canon::Xml::Node
- Object
- Canon::Xml::Node
- Canon::Xml::Nodes::ProcessingInstructionNode
- Defined in:
- lib/canon/xml/nodes/processing_instruction_node.rb
Overview
Processing Instruction node in the XPath data model
Instance Attribute Summary collapse
-
#data ⇒ Object
readonly
Returns the value of attribute data.
-
#target ⇒ Object
readonly
Returns the value of attribute target.
Attributes inherited from Canon::Xml::Node
Instance Method Summary collapse
-
#initialize(target:, data: "") ⇒ ProcessingInstructionNode
constructor
A new instance of ProcessingInstructionNode.
- #name ⇒ Object
- #node_info ⇒ Object
- #node_type ⇒ Object
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
#data ⇒ Object (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 |
#target ⇒ Object (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
#name ⇒ Object
18 19 20 |
# File 'lib/canon/xml/nodes/processing_instruction_node.rb', line 18 def name target end |
#node_info ⇒ Object
26 27 28 |
# File 'lib/canon/xml/nodes/processing_instruction_node.rb', line 26 def node_info "data: #{data} target: #{target}" end |
#node_type ⇒ Object
22 23 24 |
# File 'lib/canon/xml/nodes/processing_instruction_node.rb', line 22 def node_type :processing_instruction end |