class ActionDispatch::MiddlewareStack::Middleware

def ==(middleware)

def ==(middleware)
  case middleware
  when Middleware
    klass == middleware.klass
  when Class
    klass == middleware
  end
end

def build(app)

def build(app)
  klass.new(app, *args, &block)
end

def build_instrumented(app)

def build_instrumented(app)
  InstrumentationProxy.new(build(app), inspect)
end

def initialize(klass, args, block)

def initialize(klass, args, block)
  @klass = klass
  @args  = args
  @block = block
end

def inspect

def inspect
  if klass.is_a?(Class)
    klass.to_s
  else
    klass.class.to_s
  end
end

def name; klass.name; end

def name; klass.name; end