Class: Mutant::Mutation::Runner::Sink Private

Inherits:
Object
  • Object
show all
Includes:
Parallel::Sink
Defined in:
lib/mutant/mutation/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



14
15
16
17
18
# File 'lib/mutant/mutation/runner/sink.rb', line 14

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

Instance Method Details

#response(response) ⇒ 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

Parameters:

Returns:

  • (self)


43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
# File 'lib/mutant/mutation/runner/sink.rb', line 43

def response(response)
  fail response.error if response.error

  mutation_result = mutation_result(response.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

Returns:



23
24
25
26
27
28
29
# File 'lib/mutant/mutation/runner/sink.rb', line 23

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

Returns:

  • (Boolean)


34
35
36
# File 'lib/mutant/mutation/runner/sink.rb', line 34

def stop?
  status.stop?
end