Module: Charmkit::Plugins
- Defined in:
- lib/charmkit.rb,
lib/charmkit/plugins/core.rb,
lib/charmkit/plugins/hookenv.rb
Defined Under Namespace
Modules: Base, Core, HookEnv
Class Method Summary
collapse
Class Method Details
.load_plugin(name) ⇒ Object
12
13
14
15
16
17
18
|
# File 'lib/charmkit.rb', line 12
def self.load_plugin(name)
unless plugin = @plugins[name]
require "charmkit/plugins/#{name}"
raise Error, "plugin #{name} did not register itself correctly in Charmkit::Plugins" unless plugin = @plugins[name]
end
plugin
end
|
.register_plugin(name, mod) ⇒ Object
20
21
22
|
# File 'lib/charmkit.rb', line 20
def self.register_plugin(name, mod)
@plugins[name] = mod
end
|