Class: Conductor::Worker

Inherits:
Object
  • Object
show all
Defined in:
lib/nf-conductor/worker/worker.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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_typeObject

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_implementedObject



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