Class DaemonKit::Config
In: lib/daemon_kit/config.rb
Parent: Object

Simplify simple config file loading for daemons. Assumes the config files all live in DAEMON_ROOT/config and are YAML files. Loaded configs are accessed like a hash with string keys.

Config files can either be keyed by environment (default behavior) or be a normal hash.

Load a config by passing the filename (with or without the .yml extension) to load.

At this stage the configs are read-only.

Any of the keys can be called as methods as well.

Methods

[]   data=   extend_hash   hash   load   to_h  

Public Class methods

Return the config.yml file as a raw hash.

Load the config.yml file from DAEMON_ROOT/config

Public Instance methods

Pick out a config by name

Return the internal hash structure used, optionally symbolizing the first level of keys in the hash

[Validate]