Method: Psych::Handler#start_document

Defined in:
lib/psych/handler.rb

#start_document(version, tag_directives, implicit) ⇒ Object

Called when the document starts with the declared version, tag_directives, if the document is implicit.

version will be an array of integers indicating the YAML version being dealt with, tag_directives is a list of tuples indicating the prefix and suffix of each tag, and implicit is a boolean indicating whether the document is started implicitly.

Example

Given the following YAML:

YAML 1.1
TAG ! tag:tenderlovemaking.com,2009:
--- !squee

The parameters for start_document must be this:

version         # => [1, 1]
tag_directives  # => [["!", "tag:tenderlovemaking.com,2009:"]]
implicit        # => false


72
73
# File 'lib/psych/handler.rb', line 72

def start_document version, tag_directives, implicit
end