Class: Evilution::Result::CoverageGap Private

Inherits:
Object
  • Object
show all
Defined in:
lib/evilution/result/coverage_gap.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 Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(file_path:, subject_name:, line:, mutation_results:) ⇒ CoverageGap

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.

Returns a new instance of CoverageGap.



8
9
10
11
12
13
14
# File 'lib/evilution/result/coverage_gap.rb', line 8

def initialize(file_path:, subject_name:, line:, mutation_results:)
  @file_path = file_path
  @subject_name = subject_name
  @line = line
  @mutation_results = mutation_results.dup.freeze
  freeze
end

Instance Attribute Details

#file_pathObject (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.



6
7
8
# File 'lib/evilution/result/coverage_gap.rb', line 6

def file_path
  @file_path
end

#lineObject (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.



6
7
8
# File 'lib/evilution/result/coverage_gap.rb', line 6

def line
  @line
end

#mutation_resultsObject (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.



6
7
8
# File 'lib/evilution/result/coverage_gap.rb', line 6

def mutation_results
  @mutation_results
end

#subject_nameObject (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.



6
7
8
# File 'lib/evilution/result/coverage_gap.rb', line 6

def subject_name
  @subject_name
end

Instance Method Details

#countObject

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.



28
29
30
# File 'lib/evilution/result/coverage_gap.rb', line 28

def count
  mutation_results.length
end

#operator_namesObject

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.



16
17
18
# File 'lib/evilution/result/coverage_gap.rb', line 16

def operator_names
  mutation_results.map { |r| r.mutation.operator_name }.uniq
end

#primary_diffObject

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.



24
25
26
# File 'lib/evilution/result/coverage_gap.rb', line 24

def primary_diff
  mutation_results.first.mutation.diff
end

#primary_operatorObject

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.



20
21
22
# File 'lib/evilution/result/coverage_gap.rb', line 20

def primary_operator
  mutation_results.first.mutation.operator_name
end

#single?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.

Returns:

  • (Boolean)


32
33
34
# File 'lib/evilution/result/coverage_gap.rb', line 32

def single?
  count == 1
end