Class: Hash
- Inherits:
-
Object
- Object
- Hash
- Defined in:
- lib/kintsugi/utils.rb
Instance Method Summary collapse
-
#deep_clone ⇒ Hash
Provides a deep clone of ‘self`.
Instance Method Details
#deep_clone ⇒ Hash
Provides a deep clone of ‘self`
26 27 28 29 30 31 32 33 34 35 36 |
# File 'lib/kintsugi/utils.rb', line 26 def deep_clone transform_values do |value| begin value.deep_clone rescue NoMethodError value.clone end rescue NoMethodError value end end |