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

Version Path
eye-0.4.2 lib/eye/utils.rb
reel-eye-0.4.1 lib/eye/utils.rb
eye-0.4.1 lib/eye/utils.rb
reel-eye-0.4 lib/eye/utils.rb
eye-0.4 lib/eye/utils.rb
reel-eye-0.3.2 lib/eye/utils.rb
eye-0.3.2 lib/eye/utils.rb
reel-eye-0.3.1 lib/eye/utils.rb
eye-0.3.1 lib/eye/utils.rb
eye-0.3 lib/eye/utils.rb
eye-0.2.4 lib/eye/utils.rb
eye-0.2.3 lib/eye/utils.rb
eye-0.2.2 lib/eye/utils.rb
eye-0.2.1 lib/eye/utils.rb