Module: Kernel
- Defined in:
- lib/wasmify/rails/shim.rb,
lib/wasmify/rails/shim.rb
Overview
Support Kernel.at_exit
Constant Summary collapse
- @@at_exit_hooks =
[]
Instance Method Summary collapse
Instance Method Details
#at_exit(&block) ⇒ Object
47 48 49 |
# File 'lib/wasmify/rails/shim.rb', line 47 def at_exit(&block) @@at_exit_hooks << block end |
#execute_at_exit_hooks ⇒ Object
51 52 53 |
# File 'lib/wasmify/rails/shim.rb', line 51 def execute_at_exit_hooks @@at_exit_hooks.reverse_each { _1.call } end |
#on_wasm? ⇒ Boolean
6 |
# File 'lib/wasmify/rails/shim.rb', line 6 def on_wasm? = true |