Skip to content
On this page

End of Life Ruby 3.1 has reached end of life and gets no more fixes. Switch to Ruby 4.0 →

class · Ruby 3.1

Psych::TreeBuilder

< Psych::Handler 12 instance methods 1 class methods

This class works in conjunction with Psych::Parser to build an in-memory parse tree that represents a YAML document.

Example

Example
parser = Psych::Parser.new Psych::TreeBuilder.new
parser.parse('--- foo')
tree = parser.handler.root

See Psych::Handler for documentation on the event methods used in this class.

Class methods 1

Instance methods 12

Attributes
Read

Returns the root node for the built tree