Class: Mutant::Runner::Sink Private

Inherits:
Object
  • Object
show all
Defined in:
lib/mutant/runner/sink.rb

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

Instance Method Summary collapse

Constructor Details

#initializeundefined

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



11
12
13
14
15
# File 'lib/mutant/runner/sink.rb', line 11

def initialize(*)
  super
  @start           = env.world.timer.now
  @subject_results = {}
end

Instance Method Details

#result(mutation_index_result) ⇒ self

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.

Handle mutation finish



40
41
42
43
44
45
46
47
48
49
50
51
52
# File 'lib/mutant/runner/sink.rb', line 40

def result(mutation_index_result)
  mutation_result = mutation_result(mutation_index_result)

  subject = mutation_result.mutation.subject

  @subject_results[subject] = Result::Subject.new(
    subject:          subject,
    coverage_results: previous_coverage_results(subject).dup << coverage_result(mutation_result),
    tests:            env.selections.fetch(subject)
  )

  self
end

#statusResult::Env

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.

Runner status



20
21
22
23
24
25
26
# File 'lib/mutant/runner/sink.rb', line 20

def status
  Result::Env.new(
    env:             env,
    runtime:         env.world.timer.now - @start,
    subject_results: @subject_results.values
  )
end

#stop?Boolean

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 scheduling stopped



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

def stop?
  status.stop?
end