class Puma::PluginLoader
Public Class Methods
new()
click to toggle source
# File lib/puma/plugin.rb, line 7 def initialize @instances = [] end
Public Instance Methods
create(name)
click to toggle source
# File lib/puma/plugin.rb, line 11 def create(name) if cls = Plugins.find(name) plugin = cls.new(Plugin) @instances << plugin return plugin end raise UnknownPlugin, "File failed to register properly named plugin" end
fire_starts(launcher)
click to toggle source
# 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