Skip to content
On this page

Maintenance Ruby 3.4 gets fixes, but no new features. Switch to Ruby 4.0 →

class · Ruby 3.4

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