Class | Nanoc3::PluginRegistry |
In: |
lib/nanoc3/base/plugin_registry.rb
|
Parent: | Object |
The class responsible for keeping track of all loaded plugins, such as filters ({Nanoc3::Filter}), data sources ({Nanoc3::DataSource}) and VCSes ({Nanoc3::Extra::VCS}).
Returns the shared {PluginRegistry} instance, creating it if none exists yet.
@return [Nanoc3::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 {Nanoc3::PluginRegistry.instance}).
Finds the plugin that is a subclass of the given class and has the given name.
@param [Symbol] name The name of the plugin to return
@return [Class, nil] The plugin with the given name
Registers the given class as a plugin.
@param [Class] superclass The superclass of the plugin. For example: {Nanoc3::Filter}, {Nanoc3::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: `Nanoc3::Filters::ERB`, `"Nanoc3::Filters::Haml"`.
@param [Symbol] identifiers One or more symbols identifying the class. For example: `:haml`, :`erb`.
@return [void]