module Fend::Plugins
Module in which all Fend
plugins should be defined.
Public Class Methods
load_plugin(name)
click to toggle source
Use plugin if already loaded. If not, load and return it.
# 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
register_plugin(name, mod)
click to toggle source
Register plugin so that it can loaded.
# File lib/fend.rb, line 39 def self.register_plugin(name, mod) @plugins[name] = mod end