Implement Task::DSL#evaluate:
So that the env is available from the task DSL.
This commit is contained in:
@@ -5,7 +5,11 @@ module Producer
|
||||
ConditionNotMetError = Class.new(StandardError)
|
||||
|
||||
def initialize(&block)
|
||||
instance_eval &block
|
||||
@block = block
|
||||
end
|
||||
|
||||
def evaluate(env)
|
||||
instance_eval &@block
|
||||
rescue ConditionNotMetError
|
||||
end
|
||||
|
||||
|
Reference in New Issue
Block a user