module ElasticAPM::NaivelyHashable
TODO: Remove this? @api private
Public Instance Methods
naively_hashable?()
click to toggle source
# File lib/elastic_apm/naively_hashable.rb, line 24 def naively_hashable? true end
to_h()
click to toggle source
# File lib/elastic_apm/naively_hashable.rb, line 28 def to_h instance_variables.each_with_object({}) do |name, h| key = name.to_s.delete('@').to_sym value = instance_variable_get(name) is_hashable = value.respond_to?(:naively_hashable?) && value.naively_hashable? h[key] = is_hashable ? value.to_h : value end end