Class: ConfigLogic::Cache
- Inherits:
-
SimpleDelegator
- Object
- SimpleDelegator
- ConfigLogic::Cache
- Includes:
- Logger, Enumerable
- Defined in:
- lib/config_logic/cache.rb
Constant Summary
Constants included from Logger::Colors
Logger::Colors::BLUE, Logger::Colors::GREEN, Logger::Colors::RED, Logger::Colors::RESET, Logger::Colors::YELLOW
Instance Method Summary collapse
- #each ⇒ Object
-
#initialize(load_paths, params = {}) ⇒ Cache
constructor
A new instance of Cache.
- #reload!(params = {}) ⇒ Object
Methods included from Logger
Constructor Details
#initialize(load_paths, params = {}) ⇒ Cache
Returns a new instance of Cache.
5 6 7 8 9 |
# File 'lib/config_logic/cache.rb', line 5 def initialize(load_paths, params = {}) @load_paths = [load_paths].flatten reload!(params) super(@cache) end |
Instance Method Details
#each ⇒ Object
16 17 18 19 20 |
# File 'lib/config_logic/cache.rb', line 16 def each @cache.each do |node| yield node end end |
#reload!(params = {}) ⇒ Object
11 12 13 14 |
# File 'lib/config_logic/cache.rb', line 11 def reload!(params = {}) __setobj__(@cache) self end |