Class: Radiant::ExtensionLoader
- Inherits:
-
Object
- Object
- Radiant::ExtensionLoader
- Includes:
- Simpleton
- Defined in:
- lib/radiant/extension_loader.rb
Defined Under Namespace
Classes: DependenciesObserver
Instance Attribute Summary collapse
-
#extensions ⇒ Object
Returns the value of attribute extensions.
-
#initializer ⇒ Object
Returns the value of attribute initializer.
Instance Method Summary collapse
- #activate_extensions ⇒ Object
- #deactivate_extensions ⇒ Object
-
#initialize ⇒ ExtensionLoader
constructor
A new instance of ExtensionLoader.
- #load_extensions ⇒ Object
Methods included from Simpleton
Constructor Details
#initialize ⇒ ExtensionLoader
Returns a new instance of ExtensionLoader.
29 30 |
# File 'lib/radiant/extension_loader.rb', line 29 def initialize end |
Instance Attribute Details
#extensions ⇒ Object
Returns the value of attribute extensions.
25 26 27 |
# File 'lib/radiant/extension_loader.rb', line 25 def extensions @extensions end |
#initializer ⇒ Object
Returns the value of attribute initializer.
25 26 27 |
# File 'lib/radiant/extension_loader.rb', line 25 def initializer @initializer end |
Instance Method Details
#activate_extensions ⇒ Object
42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 |
# File 'lib/radiant/extension_loader.rb', line 42 def activate_extensions # Reset the view paths after initialize_default_admin_tabs initialize_framework_views # Reset the admin UI regions admin.load_default_regions # Make sure we have our subclasses loaded! Page.load_subclasses extensions.each do |extension| extension.activate if extension.respond_to? :activate end end |
#deactivate_extensions ⇒ Object
60 61 62 63 64 |
# File 'lib/radiant/extension_loader.rb', line 60 def deactivate_extensions extensions.each do |extension| extension.deactivate if extension.respond_to? :deactivate end end |
#load_extensions ⇒ Object
36 37 38 39 40 |
# File 'lib/radiant/extension_loader.rb', line 36 def load_extensions @observer ||= DependenciesObserver.new.observe(::ActiveSupport::Dependencies) core_extensions.each { |extension| load_extension(extension) } vendor_extensions.each { |extension| load_extension(extension) } end |