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

Representation of a single line in a source file including this specific line‘s source code, line_number and code coverage, with the coverage being either nil (coverage not applicable, e.g. comment line), 0 (line not covered) or >1 (the amount of times the line was executed)

Methods

covered?   missed?   never?   new  

External Aliases

src -> source
  Lets grab some fancy aliases, shall we?
line_number -> line
line_number -> number

Attributes

coverage  [R]  The coverage data for this line: either nil (never), 0 (missed) or >=1 (times covered)
line_number  [R]  The line number in the source file. Aliased as :line, :number
src  [R]  The source code for this line. Aliased as :source

Public Class methods

Public Instance methods

Returns true if this is a line that has been covered

Returns true if this is a line that should have been covered, but was not

Returns true if this line is not relevant for coverage

[Validate]