GoogleCloudPlatform / GoogleCloudPlatform/functions-framework-ruby
How can I include a module?
- 主要语言
- Ruby
- 星标
- 164
- 派生
- 47
- PR 合并指标
- 30 天内没有已合并 PR
描述
Normally one would add module includes inside the class. How can this be done with `FunctionsFramework`?
For example, this doesn't work:
```ruby
FunctionsFramework.http 'my_function' do |request|
include GoogleCloudLoggable
# ...
end
```
```text
NoMethodError: undefined method `include' for #<#:0x000029e70f56a6b0 @__globals={:function_name=>\"my_function\", :function_type=>:http}, @__logger=#, @formatter=nil, @logdev=#>, @binmode=false, @mon_data=#, @mon_data_owner_object_id=2460>>>", ...
```
贡献指南
调研方向
首先阅读 FunctionsFramework 的 HTTP 注册路径以及 issue 中的示例,以了解哪个对象接收该 block。检查该处是否支持包含模块,或者是否需要一个有文档说明的替代方案。当支持的用法或限制得到清晰记录,并且能够处理所示的 NoMethodError 时,即视为完成。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- ruby
- 领域
- backend
- Issue 类型
- 文档
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 活跃度
- 停滞
- 描述清晰度
- 需要澄清
- 新手友好度
- 30/100