method
revive_hash
v1_9_3_125 -
Show latest stable
- Class:
Psych::Visitors::ToRuby
revive_hash(hash, o)private
No documentation available.
# File ext/psych/lib/psych/visitors/to_ruby.rb, line 212
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