Class: Flows::SharedContextPipeline::MutationStep Private

Inherits:
Step
  • Object
show all
Defined in:
lib/flows/shared_context_pipeline/mutation_step.rb

Overview

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

Since:

  • 0.4.0

Constant Summary collapse

NODE_PREPROCESSOR =

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

Since:

  • 0.4.0

lambda do |_input, context, meta|
  context[:last_step] = meta[:name]

  context[:class].before_each_callbacks.each do |callback|
    callback.call(context[:class], meta[:name], context[:data])
  end

  [[context[:data]], EMPTY_HASH]
end
NODE_POSTPROCESSOR =

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

Since:

  • 0.4.0

lambda do |output, context, meta|
  case output
  when Flows::Result then output
  else output ? EMPTY_OK : EMPTY_ERR
  end.tap do |result|
    context[:class].after_each_callbacks.each do |callback|
      callback.call(context[:class], meta[:name], context[:data], result)
    end
  end
end

Instance Attribute Summary

Attributes inherited from Step

#lambda, #name, #next_step, #router_def

Method Summary

Methods inherited from Step

#to_node