# encoding: utf-8 module HTTPkit module Support class HandlerManager def initialize(handlers) @handlers = handlers end def notify(message, *args) @handlers.each do |handler| handler.public_send(message, *args) if handler.respond_to?(message) end end # XXX not mutation covered module Setup def setup_handlers @handlers = Support::HandlerManager.new(@config[:handlers] || []) @handlers.notify(:setup, @config, self, @connection) end end end end end