class Grape::Middleware::Stack::Middleware

def ==(other)

def ==(other)
  case other
  when Middleware
    klass == other.klass
  when Class
    klass == other || (name.nil? && klass.superclass == other)
  end
end

def build(builder)

def build(builder)
  # we need to force the ruby2_keywords_hash for middlewares that initialize contains keywords
  # like ActionDispatch::RequestId since middleware arguments are serialized
  # https://rubyapi.org/3.4/o/hash#method-c-ruby2_keywords_hash
  args[-1] = Hash.ruby2_keywords_hash(args[-1]) if args.last.is_a?(Hash) && Hash.respond_to?(:ruby2_keywords_hash)
  builder.use(klass, *args, &block)
end

def initialize(klass, args, block)

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

def inspect

def inspect
  klass.to_s
end

def name

def name
  klass.name
end