Module: Teckel::Chain

Defined in:
lib/teckel/chain.rb,
lib/teckel/chain/step.rb,
lib/teckel/chain/config.rb,
lib/teckel/chain/result.rb,
lib/teckel/chain/runner.rb

Overview

Railway style execution of multiple Operations.

  • Runs multiple Operations (steps) in order.

  • The output of an earlier step is passed as input to the next step.

  • Any failure will stop the execution chain (none of the later steps is called).

  • All Operations (steps) must return a Result

  • The result is wrapped into a Result

See Also:

  • Operation#result!

Defined Under Namespace

Modules: ClassMethods, Config Classes: Result, Runner, Step

Class Method Summary collapse

Class Method Details

.included(receiver) ⇒ Object



76
77
78
79
80
81
# File 'lib/teckel/chain.rb', line 76

def self.included(receiver)
  receiver.class_eval do
    extend Config
    extend ClassMethods
  end
end