Sha256: 21e2b73a036be871d03ae829d5d585195fe07146857e28275fb3ed420c06d6d3
Contents?: true
Size: 335 Bytes
Versions: 3
Compression:
Stored size: 335 Bytes
Contents
# frozen_string_literal: true module Declarative module DeepDup def self.call(args) case args when Array Array[*dup_items(args)] when ::Hash ::Hash[dup_items(args)] else args end end def self.dup_items(arr) arr.to_a.collect { |v| call(v) } end end end
Version data entries
3 entries across 3 versions & 3 rubygems