Class: TrustyCms::ExtensionLoader::DependenciesObserver
- Inherits:
-
MethodObserver
- Object
- MethodObserver
- TrustyCms::ExtensionLoader::DependenciesObserver
- Defined in:
- lib/trusty_cms/extension_loader.rb
Overview
The ExtensionLoader is reponsible for the loading, activation and reactivation of extensions. The noticing of important subdirectories is now handled by the ExtensionPath class.
Instance Attribute Summary collapse
-
#config ⇒ Object
Extends the reload mechanism in ActiveSupport so that extensions are deactivated and reactivated when model classes are reloaded (in development mode, usually).
Attributes inherited from MethodObserver
Instance Method Summary collapse
- #after_clear(*_args) ⇒ Object
- #before_clear(*_args) ⇒ Object
-
#initialize(rails_config) ⇒ DependenciesObserver
constructor
A new instance of DependenciesObserver.
Methods inherited from MethodObserver
Constructor Details
#initialize(rails_config) ⇒ DependenciesObserver
Returns a new instance of DependenciesObserver.
16 17 18 19 |
# File 'lib/trusty_cms/extension_loader.rb', line 16 def initialize(rails_config) #:nodoc @config = rails_config end |
Instance Attribute Details
#config ⇒ Object
Extends the reload mechanism in ActiveSupport so that extensions are deactivated and reactivated when model classes are reloaded (in development mode, usually).
14 15 16 |
# File 'lib/trusty_cms/extension_loader.rb', line 14 def config @config end |
Instance Method Details
#after_clear(*_args) ⇒ Object
26 27 28 29 30 |
# File 'lib/trusty_cms/extension_loader.rb', line 26 def after_clear(*_args) #:nodoc ExtensionLoader.load_extensions ExtensionLoader.activate_extensions end |
#before_clear(*_args) ⇒ Object
21 22 23 24 |
# File 'lib/trusty_cms/extension_loader.rb', line 21 def before_clear(*_args) #:nodoc ExtensionLoader.deactivate_extensions end |