Module | Nanoc::PluginRegistry::PluginMethods |
In: |
lib/nanoc/base/plugin_registry.rb
|
A module that contains class methods for plugins. It provides functions for setting identifiers, registering plugins and finding plugins. Plugin classes should extend this module.
@return [Hash<Symbol, Class>] All plugins of this type, with keys
being the identifiers and values the plugin classes
Sets the identifier for this plugin.
@param [Symbol] identifier An identifier to assign to this plugin.
@return [void]
Sets the identifiers for this plugin.
@param [Array<Symbol>] identifier A list of identifiers to assign to
this plugin.
@return [void]
Returns the plugin with the given name (identifier)
@param [String] name The name of the plugin class to find
@return [Class] The plugin class with the given name
Registers the given class as a plugin with the given identifier.
@param [Class, String] class_or_name The class to register, or a
string containing the class name to register.
@param [Array<Symbol>] identifiers A list of identifiers to assign to
this plugin.
@return [void]