After that, we need to configure our MRuby build. We need to modify build_config.rb. At the end of the file, let’s add our build specification. MRuby::Build.new('mrubyvst') do |conf| toolchain :gcc conf.gembox 'default' conf.gem :core => 'mruby-eval' conf.gem :github => 'iij/mruby-dir' conf.gem :github => 'iij/mruby-io' end In this case, we specify that we will use a gcc toolchain. Also, we will i
require 'rubygems' require 'erlectricity' receive do |f| f.when([:sum_two_integers, Integer, Integer]) do |a, b| f.send!([:result, [:ok, a+b]]) f.receive_loop end end As you can see, Ruby DSL is more like the Elixir. We’re creating a receive loop, match incoming messages, and if matched, send a message back. I this example, we’re waiting for the message like this {:sum_two_integers, 1, 2} and send
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く