aYamlYamlNode.transform()
The YamlNode#transform method is used to turn a tree of YamlNodes into a native Ruby object, as you would expect from a loading method, such as YAML::load. This method is handy if you want to perform a YPath select to grab a group of nodes and turn them into a new document.
players = YAML::parse( <<EOY )
player:
- given: Sammy
family: Sosa
- given: Ken
family: Griffey
- given: Mark
family: McGwire
EOY
given = players.select( "/player/*/given" )
p given.transform
# prints:
# ["Sammy", "Ken", "Mark"]