Module: Linearly::Mixins::StepCollection Private

Included in:
Flow
Defined in:
lib/linearly/mixins/step_collection.rb

Overview

This module is part of a private API. You should avoid using this module if possible, as it may be removed or be changed in the future.

StepCollection is a mixin to include in all classes which need to run more than one step.

Defined Under Namespace

Classes: Reducer

Instance Method Summary collapse

Instance Method Details

#call(state) ⇒ Statefully::State

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Keep calling steps as long as long as the state is successful

This method reeks of :reek:TooManyStatements and :reek:FeatureEnvy.

Parameters:

  • state (Statefully::State)

Returns:

  • (Statefully::State)


18
19
20
# File 'lib/linearly/mixins/step_collection.rb', line 18

def call(state)
  steps.reduce(state, &Reducer.method(:reduce))
end