Sha256: d02be692ddef470daaf4e654697c830df9a61e4c7a82924811861026888e0407
Contents?: true
Size: 415 Bytes
Versions: 33
Compression:
Stored size: 415 Bytes
Contents
module Rake ## # Mixin for creating easily cloned objects. module Cloneable # :nodoc: # 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
33 entries across 26 versions & 7 rubygems