Sha256: f05db44c2f26a199c23f28353155865399820e3f14c605af802f677458868cb7
Contents?: true
Size: 880 Bytes
Versions: 1
Compression:
Stored size: 880 Bytes
Contents
module Trailblazer class Circuit # direction, result = circuit.( circuit[:Start], options, runner: Circuit::Trace.new, stack: [] ) # Every `activity.call` is considered nested class Trace def call(activity, direction, args, debug:raise, stack:raise, **flow_options) activity_name, _ = debug[activity] activity_name ||= activity Run.(activity, direction, args, stack:[], **flow_options).tap do |direction, outgoing_options, **flow_options| # TODO: USE KW ARG FOR :stack # raise activity_name.inspect if flow_options[:stack].nil? # TODO: remove this. # TODO: fix the inspect, we need a snapshot, deep-nested. stack << [activity_name, activity, direction, outgoing_options, outgoing_options.inspect, flow_options[:stack].any? ? flow_options[:stack] : nil ] end end end # Trace end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
trailblazer-circuit-0.0.1 | lib/trailblazer/circuit/trace.rb |