rlibs/chassis.rb
# Start the Erlectricity recieve/respond loop
#
# Never returns
Start the Erlectricity recieve/respond loop
Never returns
Start the Erlectricity recieve / respond loop Never returns
def start
    receive(IO.new(3), IO.new(4)) do |f|
      f.when([:call, Array]) do |args|
        method = args[0]
        retype = args[1]
        args = args[2..-1]
        f.send! self.dispatch(method, retype, args)
        exit if Chassis.exit_after_current_dispatch
        f.receive_loop
      end
      f.when(:config) do
        f.send! [:result, self.config]
        f.receive_loop
      end
      f.when(:api) do
        f.send! [:result, self.api]
        f.receive_loop
      end
      f.when(:ping) do
        f.send! :pong
        f.receive_loop
      end
      f.when(:quit) do
        exit(0)
      end
    end
  end
def start receive ( IO . new ( 3 ) , IO . new ( 4 ) ) do | f | f . when ( [ :call , Array ] ) do | args | method = args [ 0 ] retype = args [ 1 ] args = args [ 2 .. - 1 ] f . send! self . dispatch ( method , retype , args ) exit if Chassis . exit_after_current_dispatch f . receive_loop end f . when ( :config ) do f . send! [ :result , self . config ] f . receive_loop end f . when ( :api ) do f . send! [ :result , self . api ] f . receive_loop end f . when ( :ping ) do f . send! :pong f . receive_loop end f . when ( :quit ) do exit ( 0 ) end end end
Start the Erlectricity recieve/respond loop
Never returns
Start the Erlectricity recieve / respond loop Never returns