Method: Psych::Handler#alias
- Defined in:
- lib/psych/handler.rb
#alias(anchor) ⇒ Object
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”.
109 110 |
# File 'lib/psych/handler.rb', line 109 def alias anchor end |