class Psych::Visitors::ToRuby

def init_with o, h, node

def init_with o, h, node
  c = Psych::Coder.new(node.tag)
  c.map = h
  if o.respond_to?(:init_with)
    o.init_with c
  else
    h.each { |k,v| o.instance_variable_set(:"@#{k}", v) }
  end
  o
end