Ruby 1.9.3 リファレンスマニュアル > ライブラリ一覧 > psych/handlerライブラリ > Psych::Handlerクラス > alias

instance method Psych::Handler#alias

alias(anchor) [added by psych/handler]

[TODO]

Called when an alias is found to +anchor+. +anchor+ will be the name of the anchor found.

Example

Here we have an example of an array that references itself in YAML:

--- &ponies
- first element
- *ponies

&ponies is the achor, *ponies is the alias. In this case, alias is called with "ponies".

class Psych::Handler