Sha256: 5726647665222f2329d827e54b251e61f59caef041ccd5d91991a72a47dd07f4
Contents?: true
Size: 414 Bytes
Versions: 14
Compression:
Stored size: 414 Bytes
Contents
module Eye::Utils autoload :Tail, 'eye/utils/tail' autoload :AliveArray, 'eye/utils/alive_array' autoload :CelluloidChain, 'eye/utils/celluloid_chain' def self.deep_clone(value) case when value.is_a?(Array) then value.map{|v| deep_clone(v) } when value.is_a?(Hash) then value.inject({}){|r, (k, v)| r[ deep_clone(k) ] = deep_clone(v); r } else value end end end
Version data entries
14 entries across 14 versions & 2 rubygems