Module: Kstats::Node::Config

Defined in:
lib/kstats/node/config.rb

Class Method Summary collapse

Class Method Details

.[](key, default = nil) ⇒ Object



9
10
11
12
13
# File 'lib/kstats/node/config.rb', line 9

def self.[] key, default = nil
  path = key.to_s.split(/\./)

  explore_path(path) || default
end

.init(config_file) ⇒ Object



4
5
6
7
# File 'lib/kstats/node/config.rb', line 4

def self.init config_file
  @config ||= {}
  @config.merge!(config_file)
end