Class: Mutant::Runner::Config

Inherits:
Mutant::Runner show all
Defined in:
lib/mutant/runner/config.rb

Overview

Runner for object config

Constant Summary

Constants inherited from Mutant::Runner

REGISTRY

Instance Attribute Summary collapse

Attributes inherited from Mutant::Runner

#config

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Mutant::Runner

#initialize, #reporter, #runtime, #stop?

Constructor Details

This class inherits a constructor from Mutant::Runner

Instance Attribute Details

#subjectsEnumerable<Runner::Subject> (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 subject runners

Returns:



30
31
32
# File 'lib/mutant/runner/config.rb', line 30

def subjects
  @subjects
end

Class Method Details

.run(config) ⇒ Runner

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.

Run runner for object

Parameters:

  • config (Config)
  • object (Object)

Returns:



19
20
21
22
# File 'lib/mutant/runner/config.rb', line 19

def self.run(config)
  handler = lookup(config.class)
  handler.new(config)
end

Instance Method Details

#failed_subjectsEnumerable<Subject>

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 failed subjects

Returns:



38
39
40
# File 'lib/mutant/runner/config.rb', line 38

def failed_subjects
  subjects.reject(&:success?)
end

#strategyStrategy

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:



64
65
66
# File 'lib/mutant/runner/config.rb', line 64

def strategy
  config.strategy
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 if run was successful

Returns:

  • (true)

    if run was successful

  • (false)

    otherwise



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

def success?
  failed_subjects.empty?
end