Sha256: a7f6911bd621f52230d678faca82eebc52eb1ec235266ffbd926a774ad896eb9

Contents?: true

Size: 503 Bytes

Versions: 6

Compression:

Stored size: 503 Bytes

Contents

# frozen_string_literal: true

module Mutant
  # Module providing isolation
  class Isolation
    Error = Class.new(RuntimeError)

    # Absolutly no isolation
    #
    # Only useful for debugging.
    class None < self

      # Call block in no isolation
      #
      # @return [Object]
      #
      # @raise [Error]
      #   if block terminates abnormal
      def call
        yield
      rescue => exception
        raise Error, exception
      end

    end # None
  end # Isolation
end # Mutant

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
mutant-0.8.22 lib/mutant/isolation/none.rb
mutant-0.8.21 lib/mutant/isolation/none.rb
mutant-0.8.20 lib/mutant/isolation/none.rb
mutant-0.8.19 lib/mutant/isolation/none.rb
mutant-0.8.18 lib/mutant/isolation/none.rb
mutant-0.8.17 lib/mutant/isolation/none.rb