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:
1 parent
3a0ce82799
commit
00a11e159f
2 files changed
+22
-17
No files matched your search
@@ -24,7 +24,7 @@ module Producer
|
||||
end
|
||||
|
||||
def evaluate
|
||||
@block.call
|
||||
instance_eval &@block
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
Reference in new issue
Block a user