module Hat module Middleware def self.included(base) base.instance_eval do base.include Hat::Configurable def included(base) config.worker.middlewares << self end end end end end