Class: Mutant::Killer
- Inherits:
-
Object
- Object
- Mutant::Killer
- Includes:
- AbstractType, Adamantium::Flat
- Defined in:
- lib/mutant/killer.rb,
lib/mutant/killer/rspec.rb,
lib/mutant/killer/forked.rb,
lib/mutant/killer/static.rb,
lib/mutant/killer/forking.rb
Overview
Abstract base class for mutant killers
Defined Under Namespace
Classes: Forked, Forking, Rspec, Static
Instance Attribute Summary collapse
-
#mutation ⇒ Mutation
readonly
private
Return mutation to kill.
-
#strategy ⇒ Strategy
readonly
private
Return strategy.
Instance Method Summary collapse
-
#initialize(strategy, mutation) ⇒ undefined
constructor
private
Initialize killer object.
-
#killed? ⇒ true, false
private
Test if mutant was killed.
-
#mutation_source ⇒ String
private
Return mutated source.
-
#success? ⇒ true, false
private
Test for kill failure.
Constructor Details
#initialize(strategy, mutation) ⇒ undefined
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.
Initialize killer object
34 35 36 37 |
# File 'lib/mutant/killer.rb', line 34 def initialize(strategy, mutation) @strategy, @mutation = strategy, mutation @killed = run end |
Instance Attribute Details
#mutation ⇒ Mutation (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
23 24 25 |
# File 'lib/mutant/killer.rb', line 23 def mutation @mutation end |
#strategy ⇒ Strategy (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
15 16 17 |
# File 'lib/mutant/killer.rb', line 15 def strategy @strategy end |
Instance Method Details
#killed? ⇒ 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 if mutant was killed
64 65 66 |
# File 'lib/mutant/killer.rb', line 64 def killed? @killed end |
#mutation_source ⇒ String
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
74 75 76 |
# File 'lib/mutant/killer.rb', line 74 def mutation_source mutation.source end |
#success? ⇒ 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
49 50 51 |
# File 'lib/mutant/killer.rb', line 49 def success? mutation.success?(self) end |