module Linearly::Mixins::StepCollection

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

@api private

Public Instance Methods

call(state) click to toggle source

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

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

@param state [Statefully::State]

@return [Statefully::State] @api private

# File lib/linearly/mixins/step_collection.rb, line 18
def call(state)
  steps.reduce(state, &Reducer.method(:reduce))
end