Module: DeepClone::Extensions::Hash
- Defined in:
- lib/deep_clone/extensions/hash.rb
Instance Method Summary collapse
-
#__deep_clone__ ⇒ Hash
Make a deep copy of this hash.
Instance Method Details
#__deep_clone__ ⇒ Hash
Make a deep copy of this hash.
12 13 14 15 16 17 18 |
# File 'lib/deep_clone/extensions/hash.rb', line 12 def __deep_clone__ {}.tap do |copy| each_pair do |key, value| copy.store(key, value.__deep_clone__) end end end |