End of Life Ruby 3.2 has reached end of life and gets no more fixes. Switch to Ruby 4.0 →
class method
Psych::Nodes::Document.new
new(version = [], tag_directives = [], implicit = false)
ext/psych/lib/psych/nodes/document.rb
View on GitHub ↗
# File tmp/rubies/ruby-3.2.0/ext/psych/lib/psych/nodes/document.rb, line 45
def initialize version = [], tag_directives = [], implicit = false
super()
@version = version
@tag_directives = tag_directives
@implicit = implicit
@implicit_end = true
end
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:
Example
Psych::Nodes::Document.new( [1,1], [["!", "tag:tenderlovemaking.com,2009:"]], true )
See Also
See also Psych::Handler#start_document