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?, #parse_errors, #parse_errors=, #text_content
Constructor Details
#initialize(target:, data: "") ⇒ ProcessingInstructionNode
Returns a new instance of ProcessingInstructionNode.
10 11 12 13 14 |
# File 'lib/canon/xml/nodes/processing_instruction_node.rb', line 10 def initialize(target:, data: "") super() @target = target @data = data end |
Instance Attribute Details
#data ⇒ Object (readonly)
Returns the value of attribute data.
8 9 10 |
# File 'lib/canon/xml/nodes/processing_instruction_node.rb', line 8 def data @data end |
#target ⇒ Object (readonly)
Returns the value of attribute target.
8 9 10 |
# File 'lib/canon/xml/nodes/processing_instruction_node.rb', line 8 def target @target end |
Instance Method Details
#name ⇒ Object
16 17 18 |
# File 'lib/canon/xml/nodes/processing_instruction_node.rb', line 16 def name target end |
#node_info ⇒ Object
24 25 26 |
# File 'lib/canon/xml/nodes/processing_instruction_node.rb', line 24 def node_info "data: #{data} target: #{target}" end |
#node_type ⇒ Object
20 21 22 |
# File 'lib/canon/xml/nodes/processing_instruction_node.rb', line 20 def node_type :processing_instruction end |