Class: Hyperstack::Application::Boot
Defined Under Namespace
Classes: ReactDummyParams
Class Method Summary
collapse
Class Method Details
.on_dispatch(&block) ⇒ Object
21
22
23
|
# File 'lib/hyperstack/boot.rb', line 21
def on_dispatch(&block)
receivers << block
end
|
.receivers ⇒ Object
25
26
27
28
29
|
# File 'lib/hyperstack/boot.rb', line 25
def receivers
Hyperstack::Context.set_var(self, :@receivers, force: true) { [] }
end
|
.run(context: nil) ⇒ Object
31
32
33
34
35
36
|
# File 'lib/hyperstack/boot.rb', line 31
def run(context: nil)
params = ReactDummyParams.new(context)
receivers.each do |receiver|
receiver.call params
end
end
|