Class: Mutant::Strategy
- Inherits:
-
Object
- Object
- Mutant::Strategy
- Includes:
- AbstractType, Adamantium::Flat
- Defined in:
- lib/mutant/strategy.rb,
lib/mutant/strategy/rspec.rb,
lib/mutant/strategy/rspec/example_lookup.rb
Overview
Abstract base class for killing strategies
Defined Under Namespace
Instance Attribute Summary collapse
-
#config ⇒ Config
readonly
private
Return config.
Instance Method Summary collapse
-
#error_stream ⇒ IO
private
Return error stream.
-
#initialize(config) ⇒ undefined
constructor
private
Initialize object.
-
#kill(mutation) ⇒ Killer
private
Kill mutation.
-
#killer ⇒ Class:Killer
private
Return killer.
-
#output_stream ⇒ IO
private
Return output stream.
Constructor Details
#initialize(config) ⇒ 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 object
23 24 25 |
# File 'lib/mutant/strategy.rb', line 23 def initialize(config) @config = config end |
Instance Attribute Details
#config ⇒ Config (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 config
13 14 15 |
# File 'lib/mutant/strategy.rb', line 13 def config @config end |
Instance Method Details
#error_stream ⇒ IO
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 error stream
43 44 45 |
# File 'lib/mutant/strategy.rb', line 43 def error_stream config.reporter.error_stream end |
#kill(mutation) ⇒ Killer
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.
Kill mutation
55 56 57 |
# File 'lib/mutant/strategy.rb', line 55 def kill(mutation) killer.new(self, mutation) end |
#killer ⇒ Class:Killer
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 killer
65 66 67 |
# File 'lib/mutant/strategy.rb', line 65 def killer self.class::KILLER end |
#output_stream ⇒ IO
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 output stream
33 34 35 |
# File 'lib/mutant/strategy.rb', line 33 def output_stream config.reporter.output_stream end |