class Psych::Nodes::Node

never be instantiated.
The base class for any Node in a YAML parse tree. This class should
##

def each &block

first.
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

Create a new Psych::Nodes::Node
def initialize
  @children = []
end

def to_ruby

See also Psych::Visitors::ToRuby

Convert this node to Ruby.
##
def to_ruby
  Visitors::ToRuby.create.accept(self)
end

def yaml io = nil, options = {}

See also Psych::Visitors::Emitter

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