Class: Psych::Nodes::Alias
Relationships & Source Files | |
Super Chains via Extension / Inclusion / Inheritance | |
Class Chain:
self,
Node
|
|
Instance Chain:
self,
Node ,
Enumerable
|
|
Inherits: |
Psych::Nodes::Node
|
Defined in: | ext/psych/lib/psych/nodes/alias.rb |
Overview
This class represents a YAML Alias. It points to an #anchor.
A Alias
is a terminal node and may have no children.
Class Method Summary
-
.new(anchor) ⇒ Alias
constructor
Create a new
Alias
that points to an #anchor
Node
- Inherited
Instance Attribute Summary
- #alias? ⇒ Boolean readonly
-
#anchor
rw
The anchor this alias links to.
Node
- Inherited
#alias?, | |
#children | The children of this node. |
#document?, | |
#end_column | The column number where this node ends. |
#end_line | The line number where this node ends. |
#mapping?, #scalar?, #sequence?, | |
#start_column | The column number where this node start. |
#start_line | The line number where this node start. |
#stream?, | |
#tag | An associated tag. |
Instance Method Summary
Node
- Inherited
#each | Iterate over each node in the tree. |
#to_ruby | Convert this node to Ruby. |
#to_yaml |
|
#transform |
|
#yaml | Convert this node to YAML. |
Constructor Details
.new(anchor) ⇒ Alias
Create a new Alias
that points to an #anchor
Instance Attribute Details
#alias? ⇒ Boolean
(readonly)
[ GitHub ]
# File 'ext/psych/lib/psych/nodes/alias.rb', line 18
def alias?; true; end
#anchor (rw)
The anchor this alias links to
# File 'ext/psych/lib/psych/nodes/alias.rb', line 11
attr_accessor :anchor