Method: Fend::Plugins.load_plugin
- Defined in:
- lib/fend.rb
.load_plugin(name) ⇒ Object
Use plugin if already loaded. If not, load and return it.
29 30 31 32 33 34 35 36 |
# File 'lib/fend.rb', line 29 def self.load_plugin(name) unless plugin = @plugins[name] require "fend/plugins/#{name}" raise Error, "plugin #{name} did not register itself correctly in Fend::Plugins" unless plugin = @plugins[name] end plugin end |