Class | Nanoc::PluginRegistry |
In: |
lib/nanoc/base/plugin_registry.rb
|
Parent: | Object |
The class responsible for keeping track of all loaded plugins, such as filters ({Nanoc::Filter}), data sources ({Nanoc::DataSource}) and VCSes ({Nanoc::Extra::VCS}).
Returns the shared {PluginRegistry} instance, creating it if none exists yet.
@return [Nanoc::PluginRegistry] The shared plugin registry
Creates a new plugin registry. This should usually not be necessary; it is recommended to use the shared instance (obtained from {Nanoc::PluginRegistry.instance}).
Finds the plugin that is a subclass of the given class and has the given name.
@param [Class] klass The class of the plugin to return
@param [Symbol] name The name of the plugin to return
@return [Class, nil] The plugin with the given name
Returns all plugins of the given class.
@param [Class] klass The class of the plugin to return
@return [Enumerable<Class>] A collection of class plugins
@param [Class] superclass The superclass of the plugin. For example:
{Nanoc::Filter}, {Nanoc::Extra::VCS}.
@param [Class] klass The class to get the identifiers for.
@return [Array<Symbol>] An array of identifiers for the given class
Registers the given class as a plugin.
@param [Class] superclass The superclass of the plugin. For example:
{Nanoc::Filter}, {Nanoc::Extra::VCS}.
@param [Class, String] class_or_name The class to register. This can be
a string, in which case it will be automatically converted to a proper class at lookup. For example: `Nanoc::Filters::ERB`, `"Nanoc::Filters::Haml"`.
@param [Symbol] identifiers One or more symbols identifying the class.
For example: `:haml`, :`erb`.
@return [void]