Sha256: 83cf3ef987d6d0a99ad2c41407fa2a5e06b1bae73db3c25d07178a1e9c5f8715
Contents?: true
Size: 1.38 KB
Versions: 38
Compression:
Stored size: 1.38 KB
Contents
# 2.2 * The `Polarizations` classes, e.g. in `FastTrack` could be steps in the normalizer? so we wouldn't need `reverse_merge`. # NOT lowest level. if you need that, use your own proc. # TODO: how do we track what goes into the callable? # adjust what goes into it (e.g. without direction or with kw args)? # pre contract -> step -> post contract (are these all just steps, in "mini nested pipe"?) # # # aka "Atom". def self.Task(instance: :context, method: :call, id:nil) # * ingoing contract (could be implemented as a nested pipe with 3 steps. that would allow us # to compile it to native ruby method calls later) ->(direction, options, **flow_options) { instance = flow_options[:context] if instance==:context # TODO; implement different :context (e.g. :my_context). # * incoming args # step_args = [args] # TODO: overridable. step_args = [ options, **options ] # ** call the actual thing res = instance.send(method, *step_args) # what goes in? kws? # * interpret result (e.g. true=>Right) (should we keep doing that in the tie? so the op has it easier with success, etc?) # * outgoing contract # * outgoing args [ *res, flow_options ] # * tracing: incoming, outgoing, direction, etc. - do we want that in tasks, too? } end
Version data entries
38 entries across 38 versions & 1 rubygems