lib/nanoc3/base/plugin_registry.rb in nanoc3-3.1.0a2 vs lib/nanoc3/base/plugin_registry.rb in nanoc3-3.1.0a3

- old
+ new

@@ -13,11 +13,11 @@ module PluginMethods # Sets the identifiers for this plugin. # # @param [Array<Symbol>] identifier A list of identifiers to assign to - # this plugin. + # this plugin. # # @return [void] def identifiers(*identifiers) register(self, *identifiers) end @@ -32,14 +32,14 @@ end # 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. + # string containing the class name to register. # # @param [Array<Symbol>] identifiers A list of identifiers to assign to - # this plugin. + # this plugin. # # @return [void] def register(class_or_name, *identifiers) # Find plugin class klass = self @@ -77,19 +77,19 @@ end # Registers the given class as a plugin. # # @param [Class] superclass The superclass of the plugin. For example: - # {Nanoc3::Filter}, {Nanoc3::Extra::VCS}. + # {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"`. + # 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`. + # For example: `:haml`, :`erb`. # # @return [void] def register(superclass, class_or_name, *identifiers) @map[superclass] ||= {} @@ -120,10 +120,10 @@ end # Returns a list of all plugins. The returned list of plugins is an array # with array elements in the following format: # - # { :class => ..., :superclass => ..., :identifiers => ... } + # { :class => ..., :superclass => ..., :identifiers => ... } # # @return [Array<Hash>] A list of all plugins in the format described def all plugins = [] @map.each_pair do |superclass, submap|