Class: NewRelic::Agent::Configuration::DottedHash
- Inherits:
-
Hash
- Object
- Hash
- NewRelic::Agent::Configuration::DottedHash
show all
- Defined in:
- lib/new_relic/agent/configuration/dotted_hash.rb
Class Method Summary
collapse
Instance Method Summary
collapse
Constructor Details
#initialize(hash, keep_nesting = false) ⇒ DottedHash
Returns a new instance of DottedHash.
9
10
11
12
13
14
15
16
17
|
# File 'lib/new_relic/agent/configuration/dotted_hash.rb', line 9
def initialize(hash, keep_nesting = false)
self.merge!(hash) if keep_nesting
self.merge!(dot_flattened(hash))
DottedHash.symbolize(self)
end
|
Class Method Details
.symbolize(hash) ⇒ Object
27
28
29
30
31
|
# File 'lib/new_relic/agent/configuration/dotted_hash.rb', line 27
def self.symbolize(hash)
hash.keys.each do |key|
hash[key.to_sym] = hash.delete(key)
end
end
|
Instance Method Details
#inspect ⇒ Object
19
20
21
|
# File 'lib/new_relic/agent/configuration/dotted_hash.rb', line 19
def inspect
"#<#{self.class.name}:#{object_id} #{super}>"
end
|
#to_hash ⇒ Object
23
24
25
|
# File 'lib/new_relic/agent/configuration/dotted_hash.rb', line 23
def to_hash
{}.replace(self)
end
|