Module: Julewire::Core::Integration::ForkHooks
- Defined in:
- lib/julewire/core/integration/fork_hooks.rb
Class Method Summary collapse
Class Method Details
.register(integration, component:, &callback) ⇒ Object
15 16 17 18 19 20 21 |
# File 'lib/julewire/core/integration/fork_hooks.rb', line 15 def register(integration, component:, &callback) raise ArgumentError, "block required" unless callback validate_symbol_name!(integration, name: :integration) validate_symbol_name!(component, name: :component) register_entry(integration, component, callback) end |
.run ⇒ Object
23 24 25 26 |
# File 'lib/julewire/core/integration/fork_hooks.rb', line 23 def run snapshot = entries.values snapshot.each { run_entry(it) } end |