lib/nanoc/base/plugin_registry.rb in nanoc-3.3.0 vs lib/nanoc/base/plugin_registry.rb in nanoc-3.3.1
- old
+ new
@@ -48,9 +48,15 @@
# Register
registry = Nanoc::PluginRegistry.instance
registry.register(klass, class_or_name, *identifiers)
end
+ # @return [Hash<Symbol, Class>] All plugins of this type, with keys
+ # being the identifiers and values the plugin classes
+ def all
+ Nanoc::Plugin.find_all(self)
+ end
+
# 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