Class: ConfigLogic::FileCache

Inherits:
Cache
  • Object
show all
Defined in:
lib/config_logic/file_cache.rb

Constant Summary collapse

PARSER_MAP =
{
['.yaml', '.yml'] => lambda do |path| YAML::load_file(path) end, 
['.txt']          => lambda do |path| File.read(path) end, 
['.json']         => lambda do |path| end }.freeze
VALID_EXTENSIONS =
PARSER_MAP.map { |(extensions, parser_proc)| extensions }.flatten!.freeze

Constants included from Logger::Colors

Logger::Colors::BLUE, Logger::Colors::GREEN, Logger::Colors::RED, Logger::Colors::RESET, Logger::Colors::YELLOW

Instance Method Summary collapse

Methods inherited from Cache

#each, #initialize

Methods included from Logger

#log

Constructor Details

This class inherits a constructor from ConfigLogic::Cache

Instance Method Details

#reload!(params = {}) ⇒ Object



13
14
15
16
# File 'lib/config_logic/file_cache.rb', line 13

def reload!(params = {})
  @cache = rebuild_primary_cache(params)
  super
end