从 Kemal 文件中的 after_all 处理程序,我如何修改来自路由的响应?[见下面的例子]
VERSION = "0.1.0"
require "kemal"
# Configure kemal parameters
serve_static false
get "/" do
"Hello world!"
end
after_all do |env|
# Would like to inject something here that turns "Hello world!" into "HELLO WORLD!",
# but I'm not sure how to get the original ("Hello world!") in this scope.
end
Kemal.run
该文档没有任何 after_all 路由的示例,而且我似乎无法在包含它的上下文中找到任何对象。我该怎么做?