Class: ElasticAPM::Util::DeepDup Private
- Inherits:
-
Object
- Object
- ElasticAPM::Util::DeepDup
- Defined in:
- lib/elastic_apm/util/deep_dup.rb
Overview
This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.
Makes a deep copy of an Array or Hash NB: Not guaranteed to work well with complex objects, only simple Hash, Array, String, Number, etc.
Class Method Summary collapse
- .dup(obj) ⇒ Object private
Instance Method Summary collapse
- #dup ⇒ Object private
-
#initialize(obj) ⇒ DeepDup
constructor
private
A new instance of DeepDup.
Constructor Details
#initialize(obj) ⇒ DeepDup
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Returns a new instance of DeepDup.
28 29 30 |
# File 'lib/elastic_apm/util/deep_dup.rb', line 28 def initialize(obj) @obj = obj end |
Class Method Details
.dup(obj) ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
36 37 38 |
# File 'lib/elastic_apm/util/deep_dup.rb', line 36 def self.dup(obj) new(obj).dup end |
Instance Method Details
#dup ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
32 33 34 |
# File 'lib/elastic_apm/util/deep_dup.rb', line 32 def dup deep_dup(@obj) end |