Module: Mongoid::Extensions::Array::DeepCopy
- Included in:
- Array
- Defined in:
- lib/mongoid/extensions/array/deep_copy.rb
Overview
:nodoc:
Instance Method Summary collapse
-
#_deep_copy ⇒ Array
Make a deep copy of the array.
Instance Method Details
#_deep_copy ⇒ Array
Make a deep copy of the array.
15 16 17 18 19 20 21 |
# File 'lib/mongoid/extensions/array/deep_copy.rb', line 15 def _deep_copy [].tap do |copy| each do |value| copy.push(value._deep_copy) end end end |