Class: Castle::Utils::Clone

Inherits:
Object
  • Object
show all
Defined in:
lib/castle/utils/clone.rb

Overview

Clones any object

Class Method Summary collapse

Class Method Details

.call(object) ⇒ Object

Returns a cloned object of any type



9
10
11
# File 'lib/castle/utils/clone.rb', line 9

def call(object)
  Marshal.load(Marshal.dump(object))
end