GoogleCloudPlatform / GoogleCloudPlatform/functions-framework-ruby

How can I include a module?

Open
#162 4 comments 0 reactions 0 assignees View on GitHub
enhancement p3 question
Dominant language
Ruby
Stars
164
Forks
47
PR merge metrics
No merged PRs in 30d

Description

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>>>", ...
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.