Flowdock
method

init_with

Importance_0
v2_5_5 - Show latest stable - 0 notes - Class: ToRuby
init_with(o, h, node) private

No documentation

This method has no description. You can help the Ruby community by adding new notes.

Hide source
# File ext/psych/lib/psych/visitors/to_ruby.rb, line 377
      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
Register or log in to add new notes.