lib/trailblazer/activity/dsl/linear/strategy.rb in trailblazer-activity-dsl-linear-0.1.0 vs lib/trailblazer/activity/dsl/linear/strategy.rb in trailblazer-activity-dsl-linear-0.1.1

- old
+ new

@@ -1,5 +1,7 @@ +require "forwardable" + module Trailblazer class Activity module DSL module Linear # {Activity} @@ -82,10 +84,18 @@ @state.instance_variable_set(:@sequence, seq) # FIXME: hate this so much. end extend Forwardable - def_delegators :@activity, :to_h, :call + def_delegators :@activity, :to_h + + # Injects {:exec_context} so that {:instance_method}s work. + def call(args, circuit_options={}) + @activity.( + args, + circuit_options.merge(exec_context: new) + ) + end end # Strategy end end end end