module CodeRay::Plugin
def aliases
def aliases plugin_host.load_plugin_map plugin_host.plugin_hash.inject [] do |aliases, (key, _)| aliases << key if plugin_host[key] == self aliases end end
def plugin_host host = nil
def plugin_host host = nil if host.is_a? PluginHost const_set :PLUGIN_HOST, host end self::PLUGIN_HOST end
def register_for id
end
...
register_for :my_id
class MyPlugin < PluginHost::BaseClass
Example:
Register this class for the given +id+.
def register_for id @plugin_id = id plugin_host.register self, id end
def title title = nil
Returns the title of the plugin, or sets it to the
def title title = nil if title @title = title.to_s else @title ||= name[/([^:]+)$/, 1] end end