Sha256: e8e55181b97cf26c7af089017affe38b512249860d98a7021461e2a17a4e6143

Contents?: true

Size: 175 Bytes

Versions: 3

Compression:

Stored size: 175 Bytes

Contents

require_relative "../lib/worker"

adder = Worker.new do |a,b|
  a + b
end

multiplier = Worker.new do |a,b|
  a * b
end

puts adder.perform 1, 2
puts multiplier.perform 10, 2

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
worker-0.6.0 examples/simple.rb
worker-0.3.0 examples/simple.rb
worker-0.2.0 examples/simple.rb