lib/dirty_pipeline/base.rb in dirty_pipeline-0.7.0 vs lib/dirty_pipeline/base.rb in dirty_pipeline-0.7.1

- old
+ new

@@ -59,11 +59,12 @@ storage.reset! reset! end # FIXME operation :call - argument - def chain(*args, operation: :call) - railway[operation] << Event.create(*args, tx_id: @uuid) + def chain(*args, **kwargs) + operation = kwargs.fetch(:operation) { :call } + railway[operation] << Event.create(*args, **kwargs.merge(tx_id: @uuid)) self end def call # HANDLE ANOTHER ACTION IN PROGRESS EXPLICITLY