123456789_123456789_123456789_123456789_123456789_

Class: Psych::JSON::TreeBuilder

Relationships & Source Files
Super Chains via Extension / Inclusion / Inheritance
Class Chain:
Instance Chain:
Inherits: Psych::TreeBuilder
Defined in: ext/psych/lib/psych/json/tree_builder.rb

Overview

TreeBuilder is an event based AST builder. Events are sent to an instance of TreeBuilder and a ::Psych::JSON AST is constructed.

Constant Summary

::Psych::Handler - Inherited

EVENTS, OPTIONS

Class Method Summary

::Psych::TreeBuilder - Inherited

.new

Create a new TreeBuilder instance.

Instance Attribute Summary

::Psych::TreeBuilder - Inherited

#root

Returns the root node for the built tree.

::Psych::Handler - Inherited

#streaming?

Is this handler a streaming handler?

Instance Method Summary

YAMLEvents - Included

::Psych::TreeBuilder - Inherited

#alias,
#end_document

Handles end_document events with version, tag_directives, and implicit styling.

#end_stream, #event_location, #scalar,
#start_document

Handles start_document events with version, tag_directives, and implicit styling.

#start_stream, #pop, #push, #set_end_location, #set_location, #set_start_location

::Psych::Handler - Inherited

#alias

Called when an alias is found to anchor.

#empty

Called when an empty event happens.

#end_document

Called with the document ends.

#end_mapping

Called when a map ends.

#end_sequence

Called when a sequence ends.

#end_stream

Called when the YAML stream ends.

#event_location

Called before each event with line/column information.

#scalar

Called when a scalar value is found.

#start_document

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

#start_mapping

Called when a map starts.

#start_sequence

Called when a sequence is started.

#start_stream

Called with encoding when the YAML stream starts.

Constructor Details

This class inherits a constructor from Psych::TreeBuilder