Class: Psych::Nodes::Node
Overview
The base class for any Node in a YAML parse tree. This class should never be instantiated.
Instance Attribute Summary collapse
-
#children ⇒ Object
readonly
The children of this node.
-
#tag ⇒ Object
readonly
An associated tag.
Instance Method Summary collapse
-
#initialize ⇒ Node
constructor
Create a new Psych::Nodes::Node.
-
#to_ruby ⇒ Object
(also: #transform)
Convert this node to Ruby.
-
#to_yaml(io = nil) ⇒ Object
Convert this node to YAML.
Constructor Details
#initialize ⇒ Node
Create a new Psych::Nodes::Node
16 17 18 |
# File 'lib/psych/nodes/node.rb', line 16 def initialize @children = [] end |
Instance Attribute Details
#children ⇒ Object (readonly)
The children of this node
10 11 12 |
# File 'lib/psych/nodes/node.rb', line 10 def children @children end |
#tag ⇒ Object (readonly)
An associated tag
13 14 15 |
# File 'lib/psych/nodes/node.rb', line 13 def tag @tag end |