Rework Middleware stack to match the Rack middleware protocol more closely

上级 469424c8
......@@ -27,10 +27,10 @@ def initialize(klass, *args, &block)
end
def klass
if @klass.respond_to?(:call)
@klass.call
elsif @klass.is_a?(Class)
if @klass.respond_to?(:new)
@klass
elsif @klass.respond_to?(:call)
@klass.call
else
@klass.to_s.constantize
end
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册