| Class | Engines::Plugin::List |
| In: |
lib/engines/plugin/list.rb
|
| Parent: | Array |
Finds plugins with the set with the given name (accepts Strings or Symbols), or index. So, Engines.plugins[0] returns the first-loaded Plugin, and Engines.plugins[:engines] returns the Plugin instance for the engines plugin itself.
# File lib/engines/plugin/list.rb, line 15
15: def [](name_or_index)
16: if name_or_index.is_a?(Fixnum)
17: super
18: else
19: self.find { |plugin| plugin.name.to_s == name_or_index.to_s }
20: end
21: end