Sha256: 0ffaee760a1e5cb0e47affc46df6ffe888844e4dcc88db9748e745f7282df24f
Contents?: true
Size: 472 Bytes
Versions: 52
Compression:
Stored size: 472 Bytes
Contents
# frozen_string_literal: true module ElasticAPM # @api private module NaivelyHashable def naively_hashable? true end 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 end end
Version data entries
52 entries across 52 versions & 1 rubygems