Parent

Methods

CoverageInfo

Rcov::CoverageInfo is but a wrapper for an array, with some additional checks. It is returned by FileStatistics#coverage.

Public Class Methods

new(coverage_array) click to toggle source
   # File lib/rcov/coverage_info.rb, line 4
4:   def initialize(coverage_array)
5:     @cover = coverage_array.clone
6:   end

Public Instance Methods

[](line) click to toggle source

Return the coverage status for the requested line. There are four possible return values:

  • nil if there’s no information for the requested line (i.e. it doesn’t exist)

  • true if the line was reported by Ruby as executed

  • :inferred if rcov inferred it was executed, despite not being reported by Ruby.

  • false otherwise, i.e. if it was not reported by Ruby and rcov’s heuristics indicated that it was not executed

    # File lib/rcov/coverage_info.rb, line 16
16:   def [](line)
17:     @cover[line]
18:   end
to_a() click to toggle source

Return an Array holding the code coverage information.

    # File lib/rcov/coverage_info.rb, line 29
29:   def to_a
30:     @cover.clone
31:   end

Disabled; run with --debug to generate this.

[Validate]

Generated with the Darkfish Rdoc Generator 1.1.6.