Method: Object#deepcopy
- Defined in:
- lib/extra/object.rb
#deepcopy ⇒ Object
Credit to the original author. This method retrieves a deep copy of the current object.
Returns: Deep copy of the same object.
63 64 65 |
# File 'lib/extra/object.rb', line 63 def deepcopy Marshal.load(Marshal.dump(self)) end |