Class: Ekylibre::PluginSystem::System
- Inherits:
-
Object
- Object
- Ekylibre::PluginSystem::System
- Defined in:
- lib/ekylibre/plugin_system/system.rb
Overview
This class in the interface between the Rails application and the core plugin system that is basically just the container
Instance Attribute Summary collapse
Instance Method Summary collapse
-
#initialize ⇒ System
constructor
A new instance of System.
- #plugins ⇒ Object
- #reset ⇒ Object
- #start ⇒ Object
- #started? ⇒ Boolean
Constructor Details
#initialize ⇒ System
Returns a new instance of System.
10 11 12 13 |
# File 'lib/ekylibre/plugin_system/system.rb', line 10 def initialize @started = false @container = Corindon::DependencyInjection::Container.new end |
Instance Attribute Details
#container ⇒ Corindon::DependencyInjection::Container (readonly)
8 9 10 |
# File 'lib/ekylibre/plugin_system/system.rb', line 8 def container @container end |
Instance Method Details
#plugins ⇒ Object
35 36 37 |
# File 'lib/ekylibre/plugin_system/system.rb', line 35 def plugins @container.tagged('ekylibre.system.plugin').map { |key| @container.get(key) } end |
#reset ⇒ Object
27 28 29 30 31 32 33 |
# File 'lib/ekylibre/plugin_system/system.rb', line 27 def reset if !started? start else container.clear end end |
#start ⇒ Object
15 16 17 18 19 20 |
# File 'lib/ekylibre/plugin_system/system.rb', line 15 def start if !started? @started = true boot_plugins end end |
#started? ⇒ Boolean
23 24 25 |
# File 'lib/ekylibre/plugin_system/system.rb', line 23 def started? @started end |