Method: OpenHAB::Core::ScriptHandling.script_unloaded
- Defined in:
- lib/openhab/core/script_handling.rb
.script_unloaded(priority: nil, &block) ⇒ void
This method returns an undefined value.
Add a block of code to be executed when the script is unloaded.
This can occur when openHAB shuts down, or when the script is being reloaded.
Multiple hooks can be added by calling #script_unloaded multiple times. They can be used to perform final cleanup.
54 55 56 |
# File 'lib/openhab/core/script_handling.rb', line 54 def script_unloaded(priority: nil, &block) ScriptHandlingCallbacks.script_unloaded_hooks[priority || 0] << block end |