Class: ThreadPool::Job
- Inherits:
-
Object
- Object
- ThreadPool::Job
- Defined in:
- lib/threadpool.rb
Overview
:nodoc:
Instance Method Summary collapse
-
#initialize(*args, &handler) ⇒ Job
constructor
A new instance of Job.
- #run ⇒ Object
Constructor Details
#initialize(*args, &handler) ⇒ Job
Returns a new instance of Job.
14 15 16 |
# File 'lib/threadpool.rb', line 14 def initialize(*args, &handler) @args, @handler = args, handler end |
Instance Method Details
#run ⇒ Object
18 19 20 |
# File 'lib/threadpool.rb', line 18 def run @handler.call(*@args) end |