new

new(version = [], tag_directives = [], implicit = false) Class Public methods Create a new Psych::Nodes::Document object. version is a list indicating the YAML version. tags_directives is a list of tag directive declarations implicit is a flag indicating whether the document will be implicitly started. Example: This creates a YAML document object that represents a YAML 1.1 document with one tag directive, and has an implicit start: Psych::Nodes::Document.new( [1,1], [["!", "tag

root

root() Instance Public methods Returns the root node. A Document may only have one root node: yaml.org/spec/1.1/#id898031

new

new(anchor = nil, tag = nil, implicit = true, style = BLOCK) Class Public methods Create a new Psych::Nodes::Mapping object. anchor is the anchor associated with the map or nil. tag is the tag associated with the map or nil. implicit is a boolean indicating whether or not the map was implicitly started. style is an integer indicating the mapping style. See Also See also Psych::Handler#start_mapping

new

new() Class Public methods Create a new Psych::Nodes::Node

each

each(&block) Instance Public methods Iterate over each node in the tree. Yields each node to block depth first.

to_ruby

to_ruby() Instance Public methods Convert this node to Ruby. See also Psych::Visitors::ToRuby transform

to_yaml

to_yaml(io = nil, options = {}) Instance Public methods Alias for: yaml

transform

transform() Instance Public methods Alias for: to_ruby

yaml

yaml(io = nil, options = {}) Instance Public methods Convert this node to YAML. See also Psych::Visitors::Emitter to_yaml

new

new(value, anchor = nil, tag = nil, plain = true, quoted = false, style = ANY) Class Public methods Create a new Psych::Nodes::Scalar object. value is the string value of the scalar anchor is an associated anchor or nil tag is an associated tag or nil plain is a boolean value quoted is a boolean value style is an integer idicating the string style See Also See also Psych::Handler#scalar