Sha256: c18a60ac6363d3cec7a756cd8308c1cd47f0c5c9e3bde0a0ad7f541aa6e2648f

Contents?: true

Size: 377 Bytes

Versions: 1

Compression:

Stored size: 377 Bytes

Contents

require 'slave'
#
# simple usage is simply to stand up a server object as a slave.  you do not
# need to wait for the server, join it, etc.  it will die when the parent
# process dies - even under 'kill -9' conditions
#
  class Server
    def add_two n
      n + 2
    end
  end

  slave = Slave.new :object => Server.new
  server = slave.object

  p server.add_two(40) #=> 42

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
slave-1.0.0 samples/a.rb