class Psych::Nodes::Document

  • Psych::Nodes::Scalar
    * Psych::Nodes::Mapping
    * Psych::Nodes::Sequence
    and that child may be one of the following:
    Psych::Nodes::Stream. A Psych::Nodes::Document must have one child,
    This represents a YAML Document. This node must be a child of
    ##

def initialize version = [], tag_directives = [], implicit = false

See also Psych::Handler#start_document
== See Also

)
true
[["!", "tag:tenderlovemaking.com,2009:"]],
[1,1],
Psych::Nodes::Document.new(

with one tag directive, and has an implicit start:
This creates a YAML document object that represents a YAML 1.1 document
== Example:

started.
+implicit+ is a flag indicating whether the document will be implicitly
+tags_directives+ is a list of tag directive declarations
+version+ is a list indicating the YAML version.

Create a new Psych::Nodes::Document object.
##
def initialize version = [], tag_directives = [], implicit = false
  super()
  @version        = version
  @tag_directives = tag_directives
  @implicit       = implicit
  @implicit_end   = true
end

def root

http://yaml.org/spec/1.1/#id898031
Returns the root node. A Document may only have one root node:
##
def root
  children.first
end