Class: Memorandom::PluginManager
- Inherits:
-
Object
- Object
- Memorandom::PluginManager
- Defined in:
- lib/memorandom/plugins.rb
Constant Summary collapse
- @@plugins =
{}
Class Method Summary collapse
Class Method Details
.load_plugins ⇒ Object
13 14 15 16 17 |
# File 'lib/memorandom/plugins.rb', line 13 def self.load_plugins Memorandom::Plugins.constants.each do |c| register(c.to_s, Memorandom::Plugins.const_get(c)) end end |
.plugins ⇒ Object
9 10 11 |
# File 'lib/memorandom/plugins.rb', line 9 def self.plugins @@plugins end |
.register(name, klass) ⇒ Object
5 6 7 |
# File 'lib/memorandom/plugins.rb', line 5 def self.register(name, klass) @@plugins[name.downcase.gsub(/\s+/, '_')] = klass end |