class Trailblazer::Activity::TaskWrap::Extension

Public Class Methods

new(merge:) click to toggle source
# File lib/trailblazer/activity/task_wrap.rb, line 45
def initialize(merge:)
  @merge = merge
end

Public Instance Methods

call(config:, task:, **) click to toggle source

Compile-time: Gets called via the {Normalizer} and represents an {:extensions} item. Adds/alters the activity's {wrap_static}.

# File lib/trailblazer/activity/task_wrap.rb, line 52
def call(config:, task:, **)
  before_pipe = State::Config.get(config, :wrap_static, task.circuit_task)

  State::Config.set(config, :wrap_static, task.circuit_task, @merge.(before_pipe))
end