Class: Oga::XML::ProcessingInstruction
- Inherits:
-
CharacterNode
- Object
- Node
- CharacterNode
- Oga::XML::ProcessingInstruction
- Defined in:
- lib/oga/xml/processing_instruction.rb
Overview
Class used for storing information about a single processing instruction.
Direct Known Subclasses
Instance Attribute Summary collapse
Attributes inherited from CharacterNode
Attributes inherited from Node
Instance Method Summary collapse
-
#initialize(options = {}) ⇒ ProcessingInstruction
constructor
A new instance of ProcessingInstruction.
-
#inspect ⇒ String
Methods inherited from Node
#after, #before, #children, #children=, #each_ancestor, #html?, #next_element, #parent, #previous_element, #remove, #replace, #root_node, #xml?
Methods included from ToXML
Methods included from Traversal
Constructor Details
#initialize(options = {}) ⇒ ProcessingInstruction
Returns a new instance of ProcessingInstruction
12 13 14 15 16 |
# File 'lib/oga/xml/processing_instruction.rb', line 12 def initialize( = {}) super @name = [:name] end |
Instance Attribute Details
#name ⇒ String
6 7 8 |
# File 'lib/oga/xml/processing_instruction.rb', line 6 def name @name end |
Instance Method Details
#inspect ⇒ String
19 20 21 |
# File 'lib/oga/xml/processing_instruction.rb', line 19 def inspect "ProcessingInstruction(name: #{name.inspect} text: #{text.inspect})" end |