Class: Hash

Inherits:
Object
  • Object
show all
Defined in:
lib/ubsafe/extensions/ubsafe_hash_extensions.rb

Instance Method Summary collapse

Instance Method Details

#dup_contents_1_levelObject



3
4
5
6
7
8
9
10
11
12
13
# File 'lib/ubsafe/extensions/ubsafe_hash_extensions.rb', line 3

def dup_contents_1_level
  dup = Hash.new
  self.each do |key,val|
    begin
      dup[key] = val.dup
    rescue Exception => ex
      dup[key] = val
    end
  end
  return dup
end