Class: Mutant::Result::Subject

Inherits:
Object
  • Object
show all
Includes:
Mutant::Result, Coverage
Defined in:
lib/mutant/result.rb

Overview

Subject result

Instance Method Summary collapse

Methods included from Coverage

#coverage, included

Methods included from Mutant::Result

#fail?, included, #overhead

Instance Method Details

#alive_mutation_resultsArray<Result::Mutation>

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 killed mutations

Returns:



203
204
205
# File 'lib/mutant/result.rb', line 203

def alive_mutation_results
  mutation_results.reject(&:success?)
end

#amount_mutation_resultsFixnum

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 amount of mutations

Returns:

  • (Fixnum)


214
215
216
# File 'lib/mutant/result.rb', line 214

def amount_mutation_results
  mutation_results.length
end

#amount_mutationsFixnum

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 amount of mutations

Returns:

  • (Fixnum)


224
225
226
# File 'lib/mutant/result.rb', line 224

def amount_mutations
  subject.mutations.length
end

#amount_mutations_aliveFixnum

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 number of alive mutations

Returns:

  • (Fixnum)


244
245
246
# File 'lib/mutant/result.rb', line 244

def amount_mutations_alive
  alive_mutation_results.length
end

#amount_mutations_killedFixnum

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 number of killed mutations

Returns:

  • (Fixnum)


234
235
236
# File 'lib/mutant/result.rb', line 234

def amount_mutations_killed
  killed_mutation_results.length
end

#killed_mutation_resultsArray<Result::Mutation>

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 alive mutations

Returns:



254
255
256
# File 'lib/mutant/result.rb', line 254

def killed_mutation_results
  mutation_results.select(&:success?)
end

#success?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 subject was processed successful

Returns:

  • (Boolean)


193
194
195
# File 'lib/mutant/result.rb', line 193

def success?
  alive_mutation_results.empty?
end