Sha256: 79b8c0af5026e3ab30b1368cd0a3f0259b1997df6c6e6ab04bba7edd5306061e

Contents?: true

Size: 315 Bytes

Versions: 11

Compression:

Stored size: 315 Bytes

Contents

require File.dirname(__FILE__) + '/../lib/sweat_shop'
class HelloWorker < SweatShop::Worker
  TEST_FILE = File.dirname(__FILE__) + '/test.txt' unless defined?(TEST_FILE)

  def hello(name)
    puts name
    "Hi, #{name}"
  end

  after_task do |task|
    File.open(TEST_FILE, 'w'){|f| f << task[:result]}
  end
end

Version data entries

11 entries across 11 versions & 6 rubygems

Version Path
Bira-sweat_shop-1.0.0 test/hello_worker.rb
famoseagle-sweat_shop-1.0.0 test/hello_worker.rb
famoseagle-sweat_shop-1.1.0 test/hello_worker.rb
famoseagle-sweat_shop-1.2.0 test/hello_worker.rb
famoseagle-sweat_shop-1.3.0 test/hello_worker.rb
famoseagle-sweat_shop-1.3.1 test/hello_worker.rb
netinlet-sweat_shop-1.1.0 test/hello_worker.rb
netinlet-sweat_shop-1.1.1 test/hello_worker.rb
sa-sweat_shop-1.4.3 test/hello_worker.rb
sweatshop-1.4.0 test/hello_worker.rb
sweat_shop-1.4.0 test/hello_worker.rb