Sha256: 3f6eaafedd7a1bfbda9e224b35f57d4990edc4d0b13eef849fe290d4783002d8
Contents?: true
Size: 482 Bytes
Versions: 139
Compression:
Stored size: 482 Bytes
Contents
module Rake # ########################################################################## # Mixin for creating easily cloned objects. # module Cloneable # The hook that invoked by 'clone' and 'dup' methods. def initialize_copy(source) super source.instance_variables.each do |var| src_value = source.instance_variable_get(var) value = src_value.clone rescue src_value instance_variable_set(var, value) end end end end
Version data entries
139 entries across 121 versions & 33 rubygems