Class: ElasticAPM::Config::RoundFloatHashValue Private

Inherits:
Object
  • Object
show all
Defined in:
lib/elastic_apm/config/round_float_hash_value.rb

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.

Instance Method Summary collapse

Constructor Details

#initializeRoundFloatHashValue

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 RoundFloatHashValue.



24
25
26
# File 'lib/elastic_apm/config/round_float_hash_value.rb', line 24

def initialize
  @float_converter = RoundFloat.new
end

Instance Method Details

#call(hash) ⇒ 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.



28
29
30
31
32
# File 'lib/elastic_apm/config/round_float_hash_value.rb', line 28

def call(hash)
  return {} unless hash

  hash.transform_values { |value| @float_converter.call(value) }
end