Class: Array
- Inherits:
-
Object
- Object
- Array
- Defined in:
- lib/kintsugi/utils.rb
Overview
Copyright © 2021 Lightricks. All rights reserved. Created by Ben Yohay. frozen_string_literal: true
Instance Method Summary collapse
-
#deep_clone ⇒ Array
Provides a deep clone of ‘self`.
Instance Method Details
#deep_clone ⇒ Array
Provides a deep clone of ‘self`
9 10 11 12 13 14 15 16 17 18 19 |
# File 'lib/kintsugi/utils.rb', line 9 def deep_clone map do |value| begin value.deep_clone rescue NoMethodError value.clone end rescue NoMethodError value end end |