Class: Mutant::Strategy

Inherits:
Object
  • Object
show all
Includes:
AbstractType, Adamantium::Flat
Defined in:
lib/mutant/strategy.rb,
lib/mutant/strategy/rspec.rb,
lib/mutant/strategy/rspec/example_lookup.rb

Direct Known Subclasses

Rspec, Static

Defined Under Namespace

Classes: Rspec, Static

Instance Attribute Summary collapse

Instance Method Summary collapse

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

Parameters:

  • config (Config)


21
22
23
# File 'lib/mutant/strategy.rb', line 21

def initialize(config)
  @config = config
end

Instance Attribute Details

#configConfig (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

Returns:

  • (Config)


11
12
13
# File 'lib/mutant/strategy.rb', line 11

def config
  @config
end

Instance Method Details

#error_streamIO

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

Returns:

  • (IO)


41
42
43
# File 'lib/mutant/strategy.rb', line 41

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

Parameters:

Returns:



53
54
55
# File 'lib/mutant/strategy.rb', line 53

def kill(mutation)
  killer.new(self, mutation)
end

#killerClass: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

Returns:

  • (Class:Killer)


63
64
65
# File 'lib/mutant/strategy.rb', line 63

def killer
  self.class::KILLER
end

#output_streamIO

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

Returns:

  • (IO)


31
32
33
# File 'lib/mutant/strategy.rb', line 31

def output_stream
  config.reporter.output_stream
end