Sha256: 34f0a717bc2e2362208caeae7b29759898a3f06c844d302ba41c6a25063f9b08
Contents?: true
Size: 659 Bytes
Versions: 10
Compression:
Stored size: 659 Bytes
Contents
require 'active_support/core_ext/module/attribute_accessors' require 'active_support/core_ext/hash' require 'yaml' require 'redpomo/file_cache' require 'redpomo/null_cache' module Redpomo module Config mattr_reader :todo_path, :trackers_data, :cache @@cache = NullCache 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 end end
Version data entries
10 entries across 10 versions & 2 rubygems