Class: Redmon::Config

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

Constant Summary collapse

DEFAULTS =
{
  :namespace     => 'redmon',
  :redis_url     => 'redis://127.0.0.1:6379',
  :base_path     => '',
  :app           => true,
  :worker        => true,
  :web_interface => ['0.0.0.0', 4567],
  :poll_interval => 10,
  :data_lifespan => 30,
  :secure        => false
}

Instance Method Summary collapse

Constructor Details

#initializeConfig

Returns a new instance of Config.



25
26
27
# File 'lib/redmon/config.rb', line 25

def initialize
  apply DEFAULTS
end

Instance Method Details

#apply(opts) ⇒ Object



29
30
31
# File 'lib/redmon/config.rb', line 29

def apply(opts)
  opts.each { |k,v| send("#{k}=", v) if respond_to? k }
end