GoogleCloudPlatform / GoogleCloudPlatform/functions-framework-ruby

How can I include a module?

Offen
#162 4 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen
enhancement p3 question
Vorherrschende Sprache
Ruby
Sterne
164
Forks
47
PR-Merge-Kennzahlen
Keine gemergten PRs in 30 T.

Beschreibung

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

Beitragsleitfaden

Beitragsleitfaden öffnen

Bewertung

Dieses Issue wurde noch nicht bewertet.

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.