Module: Mongoid::Extensions::Hash::DeepCopy
- Included in:
- Hash
- Defined in:
- lib/mongoid/extensions/hash/deep_copy.rb
Overview
:nodoc:
Instance Method Summary collapse
-
#_deep_copy ⇒ Hash
Make a deep copy of the hash.
Instance Method Details
#_deep_copy ⇒ Hash
Make a deep copy of the hash.
15 16 17 18 19 20 21 |
# File 'lib/mongoid/extensions/hash/deep_copy.rb', line 15 def _deep_copy {}.tap do |copy| each_pair do |key, value| copy[key] = value._deep_copy end end end |