Module: Redpomo::Config

Defined in:
lib/redpomo/config.rb

Constant Summary collapse

@@cache =
NullCache

Class Method Summary collapse

Class Method Details

.load_from_yaml(path) ⇒ Object



15
16
17
18
19
20
21
22
23
# File 'lib/redpomo/config.rb', line 15

def self.load_from_yaml(path)
  config_path = File.expand_path(path)
  return unless File.exists?(config_path)
  data = YAML::load_file(config_path)

  @@todo_path = File.expand_path(data["todo"], File.dirname(config_path))
  @@trackers_data = data["trackers"].symbolize_keys!
  @@cache = data["cache"] ? FileCache : NullCache
end