Rename Interpreter class as Worker
This commit is contained in:
13
lib/producer/core/worker.rb
Normal file
13
lib/producer/core/worker.rb
Normal file
@@ -0,0 +1,13 @@
|
||||
module Producer
|
||||
module Core
|
||||
class Worker
|
||||
def process(tasks)
|
||||
tasks.each { |t| process_task t }
|
||||
end
|
||||
|
||||
def process_task(task)
|
||||
task.actions.each(&:apply) if task.condition_met?
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
Reference in New Issue
Block a user