Class: SimpleCov::FileList

### Home Classes Methods

### In Files

- lib/simplecov/file_list.rb

### Parent

Array

### Methods

- #covered_lines
- #covered_percent
- #covered_strength
- #lines_of_code
- #missed_lines
- #never_lines
- #skipped_lines

### Class/Module Index

Quicksearch

- SimpleCov
- SimpleCov::Adapters
- SimpleCov::ArrayMergeHelper
- SimpleCov::BlockFilter
- SimpleCov::CommandGuesser
- SimpleCov::Configuration
- SimpleCov::CoverageDataError
- SimpleCov::ExitCodes
- SimpleCov::FileList
- SimpleCov::Filter
- SimpleCov::Formatter
- SimpleCov::Formatter::MultiFormatter
- SimpleCov::Formatter::SimpleFormatter
- SimpleCov::HashMergeHelper
- SimpleCov::JSON
- SimpleCov::LastRun
- SimpleCov::Railtie
- SimpleCov::Result
- SimpleCov::ResultMerger
- SimpleCov::SourceFile
- SimpleCov::SourceFile::Line
- SimpleCov::StringFilter

No matching classes.

# SimpleCov::FileList

An array of SimpleCov SourceFile instances with additional collection helper methods for calculating coverage across them etc.

### Public Instance Methods

covered_lines() click to toggle source

Returns the count of lines that have coverage

    # File lib/simplecov/file_list.rb, line 5
    def covered_lines
      return 0.0 if empty?
      map {|f| f.covered_lines.count }.inject(&:+)
    end

covered_percent() click to toggle source

Computes the coverage based upon lines covered and lines missed

    # File lib/simplecov/file_list.rb, line 34
    def covered_percent
      return 100.0 if empty? or lines_of_code == 0
      covered_lines * 100.0 / lines_of_code
    end

covered_strength() click to toggle source

Computes the strength (hits / line) based upon lines covered and lines missed

    # File lib/simplecov/file_list.rb, line 40
    def covered_strength
      return 0 if empty? or lines_of_code == 0
      map {|f| f.covered_strength }.inject(&:+) / size
    end

lines_of_code() click to toggle source

Returns the overall amount of relevant lines of code across all files in this list

    # File lib/simplecov/file_list.rb, line 29
    def lines_of_code
      covered_lines + missed_lines
    end

missed_lines() click to toggle source

Returns the count of lines that have been missed

    # File lib/simplecov/file_list.rb, line 11
    def missed_lines
      return 0.0 if empty?
      map {|f| f.missed_lines.count }.inject(&:+)
    end

never_lines() click to toggle source

Returns the count of lines that are not relevant for coverage

    # File lib/simplecov/file_list.rb, line 17
    def never_lines
      return 0.0 if empty?
      map {|f| f.never_lines.count }.inject(&:+)
    end

skipped_lines() click to toggle source

Returns the count of skipped lines

    # File lib/simplecov/file_list.rb, line 23
    def skipped_lines
      return 0.0 if empty?
      map {|f| f.skipped_lines.count }.inject(&:+)
    end

[Validate]

Generated with the Darkfish Rdoc Generator 2.