Method: Honeybadger::Config::Yaml.dotify_keys

Defined in:
lib/honeybadger/config/yaml.rb

.dotify_keys(hash, key_prefix = nil) ⇒ 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.



61
62
63
64
65
66
67
68
69
70
71
72
73
# File 'lib/honeybadger/config/yaml.rb', line 61

def self.dotify_keys(hash, key_prefix = nil)
  {}.tap do |new_hash|
    hash.each_pair do |k, v|
      k = [key_prefix, k].compact.join(".")
      if v.is_a?(Hash)
        new_hash.update(dotify_keys(v, k))
      else
        next if DISALLOWED_KEYS.include?(k.to_sym)
        new_hash[k.to_sym] = v
      end
    end
  end
end