Sha256: 13d029266bc453b09dd55905d93bd2c46cda825249945931e327303ccb770ffc

Contents?: true

Size: 451 Bytes

Versions: 3

Compression:

Stored size: 451 Bytes

Contents

# frozen_string_literal: true

module Micro
  module Cases
    module Safe
      class Flow < Cases::Flow
        private def next_use_case_result(use_case, result, input)
          instance = use_case.__new__(result, input)
          instance.call
        rescue => exception
          raise exception if Case::Error.by_wrong_usage?(exception)

          result.__set__(false, exception, :exception, instance)
        end
      end
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
u-case-3.0.0.rc3 lib/micro/cases/safe/flow.rb
u-case-3.0.0.rc2 lib/micro/cases/safe/flow.rb
u-case-3.0.0.rc1 lib/micro/cases/safe/flow.rb