Use instance_eval in Condition::DSL#evaluate:

Use instance_eval so that the assigned block is evaluated inside the
DSL sandbox instance, giving access to all required methods and instance
variables.
This commit is contained in:
Thibault Jouan
2013-08-17 21:23:01 +00:00
parent 3a0ce82799
commit 00a11e159f
2 changed files with 22 additions and 17 deletions

View File

@@ -24,7 +24,7 @@ module Producer
end
def evaluate
@block.call
instance_eval &@block
end
end
end