Method: FunctionsFramework::Function::Callable#global
- Defined in:
- lib/functions_framework/function.rb
#global(key) ⇒ Object
Get the given named global.
For most function calls, the following globals will be defined:
- :function_name (
String) The name of the running function. - :function_type (
Symbol) The type of the running function, either:httpor:cloud_event.
You can also set additional globals from a startup task.
243 244 245 246 247 |
# File 'lib/functions_framework/function.rb', line 243 def global key value = @__globals[key] value = value.value if LazyGlobal === value value end |