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:
@@ -24,7 +24,7 @@ module Producer
|
||||
end
|
||||
|
||||
def evaluate
|
||||
@block.call
|
||||
instance_eval &@block
|
||||
end
|
||||
end
|
||||
end
|
||||
|
Reference in New Issue
Block a user