Sha256: 230fb28b7b6134eca5a5ffe3ab59e6b8548e604eecda01d16e1cc2bd77ad583b
Contents?: true
Size: 376 Bytes
Versions: 1
Compression:
Stored size: 376 Bytes
Contents
module Flows # Node router for simple case when result must be a `Flows::Result` # and we don't care about resukt status key class ResultRouter def initialize(success_route, failure_route) @success_route = success_route @failure_route = failure_route end def call(output, **) output.ok? ? @success_route : @failure_route end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
flows-0.1.0 | lib/flows/result_router.rb |