[SP-8460] Introduce within executor#38
Conversation
|
@msx2 love the idea, have you thought about
Let me know |
cintrzyk
left a comment
There was a problem hiding this comment.
nice concept! I think around might be a bit misleading here, as it suggests a callback-style wrapper rather than executing steps within a specific context. Maybe something like within would better reflect the intent?
Does it work with other DSL methods? for example:
around with_something do
validate :schema
operation :notify
endif yes, then it would be great to add an example in Readme and specs 🤔
It used the same logic as the super does, but explicitly. Everything was evaluated properly. But I changed this for consistency in 869ad3c
Originally I thought about it for a moment, but I think it will bring more complexity than is necessary for what we want to accomplish here, so I'd leave it as is :)
It works with all DSL methods. Added more examples in 78398bd with mixed step/operation cases. Added there also a case where around is used inside a
I hear you... Renamed to |
around executorwithin executor
Summary
Adds a new
withinexecutor to the Opera DSL, allowing one or more steps to be wrapped with a custom method defined on the operation class.Removes
benchmarkexecutor - no longer needed.What was added
withinDSL method — wraps a block of steps with a named instance method. The method mustyieldto execute the nested steps; if it does not yield, the nested steps are skipped silently. Standard break conditions (finish!, errors) propagate correctly inside the block.The named method can also be called inline within any other step method, without the DSL block, for ad-hoc usage.