class Hyperstack::Application::Boot

Public Class Methods

on_dispatch(&block) click to toggle source
# File lib/hyperstack/boot.rb, line 21
def on_dispatch(&block)
  receivers << block
end
receivers() click to toggle source
# File lib/hyperstack/boot.rb, line 25
def receivers
  # use the force: true option so that system code needing to receive
  # boot will NOT be erased on the next Hyperloop::Context.reset!
  Hyperstack::Context.set_var(self, :@receivers, force: true) { [] }
end
run(context: nil) click to toggle source
# File lib/hyperstack/boot.rb, line 31
def run(context: nil)
  params = ReactDummyParams.new(context)
  receivers.each do |receiver|
    receiver.call params
  end
end