module Pluginator::Extensions::PluginsMap
extend Pluginator
with map of plugins: name => klass
Public Instance Methods
plugins_map(type)
click to toggle source
provide extra map of plugins with symbolized names as keys
@param type [String] name of type to generate the map for @return [Hash] map of the names and plugin classes
# File lib/plugins/pluginator/extensions/plugins_map.rb, line 32 def plugins_map(type) @plugins_map ||= {} type = type.to_s @plugins_map[type] ||= Hash[ @plugins[type].map do |plugin| [class2name(plugin), plugin] end ] end