Maintenance Ruby 3.3 gets fixes, but no new features. Switch to Ruby 4.0 →
instance method
Psych::Nodes::Node#yaml
yaml(io = nil, options = {})
ext/psych/lib/psych/nodes/node.rb
View on GitHub ↗
# File tmp/rubies/ruby-3.3.0/ext/psych/lib/psych/nodes/node.rb, line 58
def yaml io = nil, options = {}
real_io = io || StringIO.new(''.encode('utf-8'))
Visitors::Emitter.new(real_io, options).accept self
return real_io.string unless io
io
end
Convert this node to YAML.
See also Psych::Visitors::Emitter