Class: Linearly::Flow
- Inherits:
-
Object
- Object
- Linearly::Flow
- Extended by:
- Forwardable
- Includes:
- Mixins::StepCollection
- Defined in:
- lib/linearly/flow.rb
Instance Method Summary collapse
-
#>>(other) ⇒ Flow
Convenience method to join Steps into one Flow.
-
#call(state) ⇒ Statefully::State
Validate the input state and run steps as long as it’s a
Success
. -
#initialize(*steps) ⇒ Flow
constructor
Constructor for the Flow.
-
#inputs ⇒ Hash<Symbol, TrueClass>
Inputs required for the Flow.
-
#outputs ⇒ Hash<Symbol, TrueClass>
Outputs provided by the Flow.
Constructor Details
#initialize(*steps) ⇒ Flow
Constructor for the Linearly::Flow
54 55 56 57 |
# File 'lib/linearly/flow.rb', line 54 def initialize(*steps) @steps = steps @contract = Contract.new(steps) end |
Instance Method Details
#>>(other) ⇒ Flow
Convenience method to join Steps into one Linearly::Flow
70 71 72 |
# File 'lib/linearly/flow.rb', line 70 def >>(other) Flow.new(other, *@steps) end |
#call(state) ⇒ Statefully::State
Validate the input state and run steps as long as it’s a Success
40 |
# File 'lib/linearly/flow.rb', line 40 def_delegators :@contract, :inputs, :outputs |
#inputs ⇒ Hash<Symbol, TrueClass>
Inputs required for the Linearly::Flow
40 |
# File 'lib/linearly/flow.rb', line 40 def_delegators :@contract, :inputs, :outputs |
#outputs ⇒ Hash<Symbol, TrueClass>
Outputs provided by the Linearly::Flow
40 |
# File 'lib/linearly/flow.rb', line 40 def_delegators :@contract, :inputs, :outputs |