Class: Elastic::Transport::OpenTelemetry::DeepDup Private

Inherits:
Object
  • Object
show all
Defined in:
lib/elastic/transport/opentelemetry.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

Instance Method Summary collapse

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.



121
122
123
# File 'lib/elastic/transport/opentelemetry.rb', line 121

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.



129
130
131
# File 'lib/elastic/transport/opentelemetry.rb', line 129

def self.dup(obj)
  new(obj).dup
end

Instance Method Details

#dupObject

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.



125
126
127
# File 'lib/elastic/transport/opentelemetry.rb', line 125

def dup
  deep_dup(@obj)
end