Module: Priloo::Preloadable
- Defined in:
- lib/priloo/preloadable.rb
Defined Under Namespace
Modules: ClassMethods Classes: PreloadBatch, PreloadDependencies
Class Method Summary collapse
Instance Method Summary collapse
-
#_preloadable_target ⇒ Object
This method in only called in Preloaders::GenericPreloader.
- #priloo_clearall ⇒ Object
Class Method Details
.included(base) ⇒ Object
7 8 9 |
# File 'lib/priloo/preloadable.rb', line 7 def self.included(base) base.extend ClassMethods end |
Instance Method Details
#_preloadable_target ⇒ Object
This method in only called in Preloaders::GenericPreloader
Its purpose is to make sure instance variables are injected in the right instance, if it is behind a proxy (for instance, a SimpleDelegator). We cannot be 100% sure that the proxy will forward Object#instance_variable_set() properly
16 17 18 |
# File 'lib/priloo/preloadable.rb', line 16 def _preloadable_target self end |
#priloo_clearall ⇒ Object
20 21 22 23 24 |
# File 'lib/priloo/preloadable.rb', line 20 def priloo_clearall return unless instance_variable_defined?(Preloaders::GenericPreloader::PRIVATE_STORE_NAME) remove_instance_variable(Preloaders::GenericPreloader::PRIVATE_STORE_NAME) end |