Class: DeepCover::Analyser::Stats

Inherits:
StatsBase
  • Object
show all
Defined in:
lib/deep_cover/analyser/stats.rb

Constant Summary

Constants inherited from StatsBase

DeepCover::Analyser::StatsBase::DECIMALS, DeepCover::Analyser::StatsBase::VALUES

Instance Method Summary collapse

Methods inherited from StatsBase

#+, #initialize, #percent_covered, #potentially_executable, #to_h, #total, #with

Methods included from Memoize

#freeze, included

Constructor Details

This class inherits a constructor from DeepCover::Analyser::StatsBase

Instance Method Details

#percentObject



50
51
52
# File 'lib/deep_cover/analyser/stats.rb', line 50

def percent
  Analyser::StatsBase.new(to_h.transform_values { |v| (100 * v).fdiv(total).round(DECIMALS) })
end