Skip to content
On this page

Preview Ruby 4.1 is a preview. It can change before the final release. Switch to Ruby 4.0 →

class · Ruby 4.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