Class: Conductor::Worker
- Inherits:
-
Object
- Object
- Conductor::Worker
- Defined in:
- lib/nf-conductor/worker/worker.rb
Instance Attribute Summary collapse
-
#task_type ⇒ Object
Returns the value of attribute task_type.
Instance Method Summary collapse
- #execute(task) ⇒ Object
-
#initialize(task_type) ⇒ Worker
constructor
A new instance of Worker.
- #method_not_implemented ⇒ Object
Constructor Details
#initialize(task_type) ⇒ Worker
Returns a new instance of Worker.
9 10 11 |
# File 'lib/nf-conductor/worker/worker.rb', line 9 def initialize(task_type) self.task_type = task_type end |
Instance Attribute Details
#task_type ⇒ Object
Returns the value of attribute task_type.
3 4 5 |
# File 'lib/nf-conductor/worker/worker.rb', line 3 def task_type @task_type end |
Instance Method Details
#execute(task) ⇒ Object
13 14 15 |
# File 'lib/nf-conductor/worker/worker.rb', line 13 def execute(task) method_not_implemented end |
#method_not_implemented ⇒ Object
5 6 7 |
# File 'lib/nf-conductor/worker/worker.rb', line 5 def method_not_implemented raise "Conductor::Worker: Interface method must be implemented by worker subclass" end |