Module: Kernel

Defined in:
lib/clio/facets/kernel.rb

Instance Method Summary collapse

Instance Method Details

#deep_copyObject

Anything that can be marshaled can be copied in totality. This is also commonly called a deep_copy.

"ABC".copy  #=> "ABC"


8
9
10
# File 'lib/clio/facets/kernel.rb', line 8

def deep_copy
  Marshal::load(Marshal::dump(self))
end