GoogleCloudPlatform / GoogleCloudPlatform/functions-framework-ruby

How can I include a module?

Aperta
#162 4 commenti 0 reazioni 0 assegnatari Vedi su GitHub
enhancement p3 question
Lingua principale
Ruby
Stelle
164
Fork
47
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Descrizione

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

Guida per i contributori

Apri la guida per i contributori

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.