Sha256: 804989bb12de8998a5606b7d1bf86bd973c33b5b581617a075759f06d2a6a9a5

Contents?: true

Size: 354 Bytes

Versions: 4

Compression:

Stored size: 354 Bytes

Contents

# encoding: utf-8

$: << File.expand_path('../../lib', __FILE__)

require 'bundler/setup'
require 'mikka'


actor = Mikka.actor do |message|
  case message
  when 'hi'
    puts "hello yourself"
  when 'goodbye'
    puts "adieu"
    context.exit
  else
    puts "sorry, come again?"
  end
end

actor.start
actor << 'hi'
actor << 'hello'
actor << 'goodbye'

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
mikka-1.1.1-java examples/proc_example.rb
mikka-1.1.0-java examples/proc_example.rb
mikka-1.0.1-java examples/proc_example.rb
mikka-1.0.0-universal-darwin-11 examples/proc_example.rb