push
2186 of 2818 relevant lines covered (77.57%)
527.3 hits per line
| 1 |
module Concurrent |
1✔ |
| 2 |
class ImmediateExecutor |
1✔ |
| 3 |
include Executor
|
1✔ |
| 4 |
|
|
| 5 |
def post(*args, &task) |
1✔ |
| 6 |
raise ArgumentError.new('no block given') unless block_given? |
55✔ |
| 7 |
task.call(*args) |
55✔ |
| 8 |
true
|
55✔ |
| 9 |
end
|
|
| 10 |
|
|
| 11 |
def <<(task) |
1✔ |
| 12 |
post(&task) |
× |
| 13 |
self
|
× |
| 14 |
end
|
|
| 15 |
end
|
|
| 16 |
end
|