1module Psych
2  module Nodes
3    ###
4    # This class represents a {YAML Alias}[http://yaml.org/spec/1.1/#alias].
5    # It points to an +anchor+.
6    #
7    # A Psych::Nodes::Alias is a terminal node and may have no children.
8    class Alias < Psych::Nodes::Node
9      # The anchor this alias links to
10      attr_accessor :anchor
11
12      # Create a new Alias that points to an +anchor+
13      def initialize anchor
14        @anchor = anchor
15      end
16    end
17  end
18end
19