class Psych::Visitors::YAMLTree

def emit_coder c, o

def emit_coder c, o
  case c.type
  when :scalar
    @emitter.scalar c.scalar, nil, c.tag, c.tag.nil?, false, Nodes::Scalar::ANY
  when :seq
    @emitter.start_sequence nil, c.tag, c.tag.nil?, Nodes::Sequence::BLOCK
    c.seq.each do |thing|
      accept thing
    end
    @emitter.end_sequence
  when :map
    register o, @emitter.start_mapping(nil, c.tag, c.implicit, c.style)
    c.map.each do |k,v|
      accept k
      accept v
    end
    @emitter.end_mapping
  when :object
    accept c.object
  end
end