lib/eco/api/usecases/use_case_io.rb in eco-helpers-0.9.1 vs lib/eco/api/usecases/use_case_io.rb in eco-helpers-0.9.2

- old
+ new

@@ -61,21 +61,20 @@ end def chain(usecase:) raise "It should be a UseCase. Given: #{usecase}" if !usecase.is_a?(UseCase) - kargs = params(keyed: true) + aux_io = self.class.new(input: input, people: people, session: session, options: options, usecase: usecase) + kargs = aux_io.params(keyed: true) - # TODO: review chaining framework (redirection should depend on self.type as well) - case usecase.type + case self.type when :import kargs[:input] = output when :filter kargs[:people] = output when :transform, :sync, :export # no redirections => should it redirect the input? end - self.class.new(kargs) end protected