Thibault Jouan 0904fa1fc9 Implement Worker class:
* Move recipe processing code in the worker;
* Refactor CLI and use the the worker;
* Implement Recipe#tasks and remove tasks application during evaluation,
  tasks are now applied by the worker after all evaluations are done.
2013-08-10 14:47:02 +00:00

20 lines
340 B
Ruby

module Producer
module Core
class Task
attr_reader :name, :actions
def initialize(name, &block)
@name = name
@block = block
@actions = []
end
def evaluate(env)
dsl = DSL.new(&@block)
dsl.evaluate(env)
@actions = dsl.actions
end
end
end
end