require "al_template" require "al_worker_ipc" SERVER_NODE = "/tmp/ipc_server" class IpcSampleController < AlController def action_index() @result_message = "ここにIPCプログラムからの戻り値が表示されます。" AlTemplate.run("index.rhtml") end def action_idle() ipc = AlWorker::Ipc.open(SERVER_NODE) @result_message = ipc.call("idle").to_s AlTemplate.run("index.rhtml") end def action_hello() ipc = AlWorker::Ipc.open(SERVER_NODE) @result_message = ipc.call("hello").to_s AlTemplate.run("index.rhtml") end def action_upper() ipc = AlWorker::Ipc.open(SERVER_NODE) @result_message = ipc.call("upper", {'A'=>'dog','B'=>'Cat'}).to_s AlTemplate.run("index.rhtml") end end