Class: Moxml::C14n::Nodes::ProcessingInstructionNode

Inherits:
Moxml::C14n::Node show all
Defined in:
lib/moxml/c14n/nodes/processing_instruction_node.rb

Overview

Processing Instruction node.

Instance Attribute Summary collapse

Attributes inherited from Moxml::C14n::Node

#children, #parent

Instance Method Summary collapse

Methods inherited from Moxml::C14n::Node

#add_child, #in_node_set=, #in_node_set?

Constructor Details

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

Returns a new instance of ProcessingInstructionNode.



10
11
12
13
14
# File 'lib/moxml/c14n/nodes/processing_instruction_node.rb', line 10

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

Instance Attribute Details

#dataObject (readonly)

Returns the value of attribute data.



8
9
10
# File 'lib/moxml/c14n/nodes/processing_instruction_node.rb', line 8

def data
  @data
end

#targetObject (readonly)

Returns the value of attribute target.



8
9
10
# File 'lib/moxml/c14n/nodes/processing_instruction_node.rb', line 8

def target
  @target
end

Instance Method Details

#nameObject



16
17
18
# File 'lib/moxml/c14n/nodes/processing_instruction_node.rb', line 16

def name
  target
end

#node_typeObject



20
21
22
# File 'lib/moxml/c14n/nodes/processing_instruction_node.rb', line 20

def node_type
  :processing_instruction
end

#text_contentObject



24
25
26
# File 'lib/moxml/c14n/nodes/processing_instruction_node.rb', line 24

def text_content
  ""
end