class Psych::Nodes::Node
never be instantiated.
The base class for any Node in a YAML parse tree. This class should
##
def each &block
Iterate over each node in the tree. Yields each node to +block+ depth
##
def each &block return enum_for :each unless block_given? Visitors::DepthFirst.new(block).accept self end
def initialize
def initialize @children = [] end
def to_ruby
Convert this node to Ruby.
##
def to_ruby Visitors::ToRuby.create.accept(self) end
def yaml io = nil, options = {}
Convert this node to YAML.
##
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