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



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

def initialize anchor
  @anchor = anchor
end

Instance Attribute Details

#anchorObject

The anchor this alias links to



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

def anchor
  @anchor
end