Flowdock
method

revive_hash

Importance_0
Ruby latest stable (v1_9_3_392) - 0 notes - Class: ToRuby
revive_hash(hash, o) 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 255
      def revive_hash hash, o
        @st[o.anchor] = hash if o.anchor

          o.children.each_slice(2) { |k,v|
          key = accept(k)

          if key == '<<'
            case v
            when Nodes::Alias
              hash.merge! accept(v)
            when Nodes::Sequence
              accept(v).reverse_each do |value|
                hash.merge! value
              end
            else
              hash[key] = accept(v)
            end
          else
            hash[key] = accept(v)
          end

        }
        hash
      end
Register or log in to add new notes.