Module: ViewComponent::CompileCache
- Defined in:
- lib/view_component/compile_cache.rb
Overview
Keeps track of which templates have already been compiled This is not part of the public API
Class Method Summary collapse
Class Method Details
.compiled?(klass) ⇒ Boolean
17 18 19 |
# File 'lib/view_component/compile_cache.rb', line 17 def compiled?(klass) cache.include? klass end |
.invalidate! ⇒ Object
21 22 23 |
# File 'lib/view_component/compile_cache.rb', line 21 def invalidate! cache.clear end |
.register(klass) ⇒ Object
13 14 15 |
# File 'lib/view_component/compile_cache.rb', line 13 def register(klass) cache << klass end |