class Psych::Nodes::Document
Experimental RBS support (using type sampling data from the type_fusion project).
# sig/psych/nodes/document.rbs class Psych::Nodes::Document < Psych::Nodes::Psych::Nodes::Node def initialize: (?Array[] version, ?Array[] tag_directives, ?false implicit) -> void def root: () -> Psych::Nodes::Mapping end
-
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 document?; true; end
def document?; true; end
def initialize version = [], tag_directives = [], implicit = false
Experimental RBS support (using type sampling data from the type_fusion project).
def initialize: (? version, ? tag_directives, ?false implicit) -> void
This signature was generated using 7 samples from 1 application.
== 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
Experimental RBS support (using type sampling data from the type_fusion project).
def root: () -> Psych::Nodes::Mapping
This signature was generated using 8 samples from 1 application.
Returns the root node. A Document may only have one root node:
##
def root children.first end