Module: WatchTower::Config
Constant Summary collapse
- @@config =
Define the config class variable
nil
Instance Method Summary collapse
-
#[](config) ⇒ Object
Return a particular config variable from the parsed config file.
-
#config_file ⇒ String
Get the config file.
Instance Method Details
#[](config) ⇒ Object
Return a particular config variable from the parsed config file
17 18 19 20 21 22 23 24 |
# File 'lib/watch_tower/config.rb', line 17 def [](config) if @@config.nil? check_config_file @@config ||= parse_config_file end @@config[:watch_tower].send(:[], config) end |
#config_file ⇒ String
Get the config file
29 30 31 |
# File 'lib/watch_tower/config.rb', line 29 def config_file File.join(USER_PATH, 'config.yml') end |