README.md in concurrent_worker-0.2.3 vs README.md in concurrent_worker-0.3.0
- old
+ new
@@ -27,11 +27,11 @@
```ruby
require 'concurrent_worker'
Thread.abort_on_exception = true
# define a work block.
-logger = ConcurrentWorker::Worker.new do |args|
+logger = ConcurrentWorker::Worker.new do |*args|
printf(*args)
$stdout.flush
nil
end
@@ -43,10 +43,10 @@
```
If you need some preparation for the work block, you can define 'base block'.
```ruby
-logger = ConcurrentWorker::Worker.new do |args|
+logger = ConcurrentWorker::Worker.new do |*args|
# work block and base block can share object with instance variable(@xxx).
printf(@file, *args)
@file.flush
nil
end