Plugins have to include this module. IMPORTANT: Use extend for this module. See CodeRay::PluginHost for examples.
# File lib/coderay/helpers/plugin.rb, line 265 def aliases plugin_host.plugin_hash.inject [] do |aliases, (key, _)| aliases << key if plugin_host[key] == self aliases end end
The PluginHost for this Plugin class.
# File lib/coderay/helpers/plugin.rb, line 258 def plugin_host host = nil if host.is_a? PluginHost const_set :PLUGIN_HOST, host end self::PLUGIN_HOST end
Register this class for the given id.
Example:
class MyPlugin < PluginHost::BaseClass register_for :my_id ... end
See PluginHost.register.
# File lib/coderay/helpers/plugin.rb, line 242 def register_for id @plugin_id = id plugin_host.register self, id end
Generated with the Darkfish Rdoc Generator 2.