Module: Mutant::Result::Coverage
Overview
Coverage mixin
Class Method Summary collapse
-
.included(host) ⇒ undefined
private
Hook called when module gets included.
Instance Method Summary collapse
-
#coverage ⇒ Rational
private
Return coverage.
Class Method Details
.included(host) ⇒ undefined
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.
Hook called when module gets included
28 29 30 31 32 |
# File 'lib/mutant/result.rb', line 28 def self.included(host) super host.memoize :coverage end |
Instance Method Details
#coverage ⇒ Rational
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 coverage
14 15 16 17 18 |
# File 'lib/mutant/result.rb', line 14 def coverage return Rational(0) if amount_mutation_results.zero? Rational(amount_mutations_killed, amount_mutation_results) end |