Class: Puma::PluginLoader
Relationships & Source Files | |
Inherits: | Object |
Defined in: | lib/puma/plugin.rb |
Class Method Summary
- .new ⇒ PluginLoader constructor
Instance Method Summary
Constructor Details
.new ⇒ PluginLoader
# File 'lib/puma/plugin.rb', line 7
def initialize @instances = [] end
Instance Method Details
#create(name)
# File 'lib/puma/plugin.rb', line 11
def create(name) if cls = Plugins.find(name) plugin = cls.new @instances << plugin return plugin end raise UnknownPlugin, "File failed to register properly named plugin" end
#fire_starts(launcher)
[ GitHub ]# File 'lib/puma/plugin.rb', line 21
def fire_starts(launcher) @instances.each do |i| if i.respond_to? :start i.start(launcher) end end end