Class: Rys::PluginsManagement

Inherits:
Object
  • Object
show all
Includes:
Singleton
Defined in:
lib/rys/plugins_management.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initializePluginsManagement


22
23
24
# File 'lib/rys/plugins_management.rb', line 22

def initialize
  @plugins = []
end

Instance Attribute Details

#pluginsObject (readonly)

Returns the value of attribute plugins


6
7
8
# File 'lib/rys/plugins_management.rb', line 6

def plugins
  @plugins
end

Class Method Details

.add(engine_klass) ⇒ Object


8
9
10
# File 'lib/rys/plugins_management.rb', line 8

def self.add(engine_klass)
  instance.add(engine_klass)
end

.allObject


12
13
14
15
16
17
18
19
20
# File 'lib/rys/plugins_management.rb', line 12

def self.all
  if block_given?
    instance.plugins.each do |plugin|
      yield plugin
    end
  else
    instance.plugins
  end
end

Instance Method Details

#add(engine_klass) ⇒ Object


26
27
28
# File 'lib/rys/plugins_management.rb', line 26

def add(engine_klass)
  @plugins << engine_klass
end