Class: NewRelic::Agent::Configuration::DottedHash

Inherits:
Hash
  • Object
show all
Defined in:
lib/new_relic/agent/configuration.rb

Instance Method Summary collapse

Constructor Details

#initialize(hash) ⇒ DottedHash

Returns a new instance of DottedHash.



45
46
47
48
49
50
# File 'lib/new_relic/agent/configuration.rb', line 45

def initialize(hash)
  self.merge!(dot_flattened(hash))
  keys.each do |key|
    self[(key.to_sym rescue key) || key] = delete(key)
  end
end

Instance Method Details

#inspectObject



52
53
54
# File 'lib/new_relic/agent/configuration.rb', line 52

def inspect
  "#<#{self.class.name}:#{object_id} #{super}>"
end

#to_hashObject



56
57
58
# File 'lib/new_relic/agent/configuration.rb', line 56

def to_hash
  {}.replace(self)
end