使用块的 Kemal 配置
Kemal configuration using blocks
Kemal 当前允许通过以下方式设置配置选项:
Kemal.config.env = "development"
Kemal.config.port = "3456"
我想用积木做一些事情:
configuration do |config|
config.env = "development"
config.port = "3456"
...
end
这可能吗?
感谢您的任何见解。
我相信,您可以使用这样的 Object#tap 方法:
Kemal.config.tap do |config|
config.env = "development"
config.port = "3456"
...
end
Kemal 当前允许通过以下方式设置配置选项:
Kemal.config.env = "development"
Kemal.config.port = "3456"
我想用积木做一些事情:
configuration do |config|
config.env = "development"
config.port = "3456"
...
end
这可能吗?
感谢您的任何见解。
我相信,您可以使用这样的 Object#tap 方法:
Kemal.config.tap do |config|
config.env = "development"
config.port = "3456"
...
end