Sha256: e8f0579da667ec6fa605544c54ca5bef8fb2799925ac258c2036989cb7f98373

Contents?: true

Size: 332 Bytes

Versions: 1

Compression:

Stored size: 332 Bytes

Contents

require File.expand_path(File.dirname(__FILE__) + '/../lib/sweatshop')
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

1 entries across 1 versions & 1 rubygems

Version Path
sweatshop-1.6.0 test/hello_worker.rb