Sha256: 5c95130dc03c8654c2f2bd7e0a2864057043e44a5abbd23932f170fdb3be9ac0

Contents?: true

Size: 308 Bytes

Versions: 3

Compression:

Stored size: 308 Bytes

Contents

# frozen_string_literal: true

module Dry
  module Effects
    module Instructions
      class Raise < Instruction
        attr_reader :error

        def initialize(error)
          super()
          @error = error
        end

        def call
          raise error
        end
      end
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
dry-effects-0.4.1 lib/dry/effects/instructions/raise.rb
dry-effects-0.4.0 lib/dry/effects/instructions/raise.rb
dry-effects-0.3.1 lib/dry/effects/instructions/raise.rb