Class SimpleCov::SourceFile
In: lib/simplecov/source_file.rb
Parent: Object

Representation of a source file including it‘s coverage data, source code, source lines and featuring helpers to interpret that data.

Methods

Classes and Modules

Class SimpleCov::SourceFile::Line

Attributes

coverage  [R]  The array of coverage data received from the Coverage.result
filename  [R]  The full path to this source file (e.g. /User/colszowka/projects/simplecov/lib/simplecov/source_file.rb)

Public Class methods

Public Instance methods

Warning to identify condition from Issue 56

The coverage for this file in percent. 0 if the file has no relevant lines

Returns all source lines for this file as instances of SimpleCov::SourceFile::Line, and thus including coverage data. Aliased as :source_lines

Returns the number of relevant lines (covered + missed)

Returns all lines that should have been, but were not covered as instances of SimpleCov::SourceFile::Line

Returns all lines that are not relevant for coverage as SimpleCov::SourceFile::Line instances

Will go through all source files and mark lines that are wrapped within # :nocov: comment blocks as skipped.

The path to this source file relative to the projects directory

Returns all lines that were skipped as SimpleCov::SourceFile::Line instances

source()

Alias for src

source_lines()

Alias for lines

The source code for this file. Aliased as :source

[Validate]