Module: Rwm::RakeCache
- Defined in:
- lib/rwm/rake.rb
Class Attribute Summary collapse
-
.declarations ⇒ Object
readonly
Returns the value of attribute declarations.
Class Method Summary collapse
Class Attribute Details
.declarations ⇒ Object (readonly)
Returns the value of attribute declarations.
25 26 27 |
# File 'lib/rwm/rake.rb', line 25 def declarations @declarations end |
Class Method Details
.ensure_cache_config_task ⇒ Object
36 37 38 39 40 41 42 |
# File 'lib/rwm/rake.rb', line 36 def ensure_cache_config_task return if Rake::Task.task_defined?("rwm:cache_config") Rake::Task.define_task("rwm:cache_config") do puts JSON.generate(Rwm::RakeCache.declarations) end end |
.register(task_name, output:) ⇒ Object
27 28 29 30 |
# File 'lib/rwm/rake.rb', line 27 def register(task_name, output:) @declarations[task_name.to_s] = { "output" => output } ensure_cache_config_task end |
.reset! ⇒ Object
32 33 34 |
# File 'lib/rwm/rake.rb', line 32 def reset! @declarations = {} end |