Module: Pluginator::Extensions::PluginsMap
- Includes:
- Conversions
- Included in:
- ClassExist, FirstAsk, FirstClass, Matching
- Defined in:
- lib/plugins/pluginator/extensions/plugins_map.rb
Overview
extend Pluginator with map of plugins: name => klass
Instance Method Summary collapse
-
#plugins_map(type) ⇒ Hash
provide extra map of plugins with symbolized names as keys.
Methods included from Conversions
#class2name, #class2string, #string2class
Instance Method Details
#plugins_map(type) ⇒ Hash
provide extra map of plugins with symbolized names as keys
32 33 34 35 36 37 38 39 40 |
# 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 |