Class: Psych::Nodes::Alias

Inherits:
Node show all
Defined in:
lib/psych/nodes/alias.rb

Overview

This class represents a YAML Alias. It points to an anchor.

A Psych::Nodes::Alias is a terminal node and may have no children.

Instance Attribute Summary collapse

Attributes inherited from Node

#children, #tag

Instance Method Summary collapse

Methods inherited from Node

#each, #to_ruby, #yaml

Constructor Details

#initialize(anchor) ⇒ Alias

Create a new Alias that points to an anchor



13
14
15
# File 'lib/psych/nodes/alias.rb', line 13

def initialize anchor
  @anchor = anchor
end

Instance Attribute Details

#anchorObject

The anchor this alias links to



10
11
12
# File 'lib/psych/nodes/alias.rb', line 10

def anchor
  @anchor
end