class Ekylibre::PluginSystem::System

This class in the interface between the Rails application and the core plugin system that is basically just the container

Attributes

container[R]

@return [Corindon::DependencyInjection::Container]

Public Class Methods

new() click to toggle source
# File lib/ekylibre/plugin_system/system.rb, line 10
def initialize
  @started = false
  @container = Corindon::DependencyInjection::Container.new
end

Public Instance Methods

plugins() click to toggle source
# File lib/ekylibre/plugin_system/system.rb, line 35
def plugins
  @container.tagged('ekylibre.system.plugin').map { |key| @container.get(key) }
end
reset() click to toggle source
# File lib/ekylibre/plugin_system/system.rb, line 27
def reset
  if !started?
    start
  else
    container.clear
  end
end
start() click to toggle source
# File lib/ekylibre/plugin_system/system.rb, line 15
def start
  if !started?
    @started = true
    boot_plugins
  end
end
started?() click to toggle source

@return [Boolean]

# File lib/ekylibre/plugin_system/system.rb, line 23
def started?
  @started
end

Private Instance Methods

boot_plugins() click to toggle source
# File lib/ekylibre/plugin_system/system.rb, line 41
def boot_plugins
  plugins.each { |p| p.boot(container) }
end