Class: HeimdallApm::Config

Inherits:
Object
  • Object
show all
Defined in:
lib/heimdall_apm/config.rb

Instance Method Summary collapse

Constructor Details

#initializeConfig

Returns a new instance of Config.



3
4
5
6
# File 'lib/heimdall_apm/config.rb', line 3

def initialize
  @loaded = nil
  load_default_config
end

Instance Method Details

#has_key?(key) ⇒ Boolean Also known as: key?

Returns:

  • (Boolean)


14
15
16
# File 'lib/heimdall_apm/config.rb', line 14

def has_key?(key)
  @settings.key?(key)
end

#value(key) ⇒ Object Also known as: []



8
9
10
11
# File 'lib/heimdall_apm/config.rb', line 8

def value(key)
  # TODO: handle empty strings keys or boolean passed as strings
  @loaded && @settings[key]
end