# File lib/grape/middleware/stack.rb, line 76 def merge_with(middleware_specs) middleware_specs.each do |operation, *args| if args.last.is_a?(Proc) public_send(operation, *args, &args.pop) else public_send(operation, *args) end end end