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.



41
42
43
44
45
46
# File 'lib/new_relic/agent/configuration.rb', line 41

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



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

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

#to_hashObject



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

def to_hash
  {}.replace(self)
end