Class: Mutant::Killer

Inherits:
Object
  • Object
show all
Includes:
AbstractType, Adamantium::Flat
Defined in:
lib/mutant/killer.rb,
lib/mutant/killer/rspec.rb,
lib/mutant/killer/static.rb,
lib/mutant/killer/forking.rb

Overview

Abstract base class for mutant killers

Direct Known Subclasses

Forked, Forking, Rspec, Static

Defined Under Namespace

Classes: Forked, Forking, Rspec, Static

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#mutationMutation (readonly)

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Return mutation to kill

Returns:



93
94
95
# File 'lib/mutant/killer.rb', line 93

def mutation
  @mutation
end

#runtimeFloat (readonly)

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Return runtime of killer

Returns:

  • (Float)


26
27
28
# File 'lib/mutant/killer.rb', line 26

def runtime
  @runtime
end

#strategyStrategy (readonly)

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Return strategy

Returns:



54
55
56
# File 'lib/mutant/killer.rb', line 54

def strategy
  @strategy
end

Class Method Details

.typeString

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Return name of killer

Returns:

  • (String)


62
63
64
# File 'lib/mutant/killer.rb', line 62

def self.type
  self::TYPE
end

Instance Method Details

#fail?true, false

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Test for kill failure

Returns:

  • (true)

    returns true when mutant was killed

  • (false)

    returns false otherwise



16
17
18
# File 'lib/mutant/killer.rb', line 16

def fail?
  !@killed
end

#identificationString

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Return identification

Returns:

  • (String)


72
73
74
# File 'lib/mutant/killer.rb', line 72

def identification
  "#{type}:#{mutation.identification}".freeze
end

#mutation_sourceString

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Return mutated source

Returns:

  • (String)


44
45
46
# File 'lib/mutant/killer.rb', line 44

def mutation_source
  mutation.source
end

#original_sourceString

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Return original source

Returns:

  • (String)


34
35
36
# File 'lib/mutant/killer.rb', line 34

def original_source
  mutation.original_source
end

#typeString

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Return mae of killer

Returns:

  • (String)


83
84
85
# File 'lib/mutant/killer.rb', line 83

def type
  self.class.type
end