Sha256: cd47f911fb03c7421eec5cf1db73c43c730265097816775379c5e681af5e21ee

Contents?: true

Size: 607 Bytes

Versions: 13

Compression:

Stored size: 607 Bytes

Contents

module Mutant
  class Killer
    # Abstract base class for killer with static result
    class Static < self

      # Return result
      #
      # @return [true]
      #   if mutation was killed
      #
      # @return [false]
      #   otherwise
      #
      # @api private
      #
      def run
        self.class::RESULT
      end

      # Killer that is always successful
      class Success < self
        TYPE = 'success'.freeze
        RESULT = true
      end

      # Killer that always fails
      class Fail < self
        TYPE = 'fail'.freeze
        RESULT = false
      end
    end
  end
end

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
mutant-0.2.20 lib/mutant/killer/static.rb
mutant-0.2.17 lib/mutant/killer/static.rb
mutant-0.2.16 lib/mutant/killer/static.rb
mutant-0.2.15 lib/mutant/killer/static.rb
mutant-0.2.14 lib/mutant/killer/static.rb
mutant-0.2.13 lib/mutant/killer/static.rb
mutant-0.2.12 lib/mutant/killer/static.rb
mutant-0.2.11 lib/mutant/killer/static.rb
mutant-0.2.9 lib/mutant/killer/static.rb
mutant-0.2.8 lib/mutant/killer/static.rb
mutant-0.2.7 lib/mutant/killer/static.rb
mutant-0.2.6 lib/mutant/killer/static.rb
mutant-0.2.5 lib/mutant/killer/static.rb