Implement task evaluation feature

This commit is contained in:
Thibault Jouan
2013-07-27 23:53:12 +00:00
parent c7295fb977
commit baaa957e9e
6 changed files with 77 additions and 0 deletions

16
lib/producer/core/task.rb Normal file
View File

@@ -0,0 +1,16 @@
module Producer
module Core
class Task
attr_reader :name
def initialize(name, &block)
@name = name
@block = block
end
def evaluate
instance_eval &@block
end
end
end
end