Ruby 1.9.3 リファレンスマニュアル > ライブラリ一覧 > psych/handlerライブラリ > Psych::Handlerクラス > start_document

instance method Psych::Handler#start_document

start_document(version, tag_directives, implicit) [added by psych/handler]

[TODO]

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
class Psych::Handler