lib/eco/api/session/config/workflow.rb in eco-helpers-2.0.2 vs lib/eco/api/session/config/workflow.rb in eco-helpers-2.0.3
- old
+ new
@@ -193,9 +193,10 @@
# @yieldparam stage_workflow [Eco::API::Session::Config::Workflow] the _target stage_ referred by `key`
# @yieldparam io [Eco::API::UseCases::BaseIO] the input/output object carried througout all the _workflow_
# @yieldreturn [Eco::API::UseCases::BaseIO] the `io` input/output object carried througout all the _workflow_
# @return [Eco::API::Session::Config::Workflow] the current stage object (to ease chainig).
def run(key = nil, io:, &block)
+ raise "Missing BaseIO object" unless io.is_a?(Eco::API::UseCases::BaseIO)
begin
if key
io = stage(key).run(io: io, &block)
elsif pending?
@before.each {|c| io = c.call(self, io)}