Class: SourceFileCoverage
- Inherits:
-
SimpleCov::SourceFile
- Object
- SimpleCov::SourceFile
- SourceFileCoverage
- Defined in:
- app/models/source_file_coverage.rb
Instance Method Summary collapse
-
#initialize(project, commit, filename, coverage) ⇒ SourceFileCoverage
constructor
A new instance of SourceFileCoverage.
Constructor Details
#initialize(project, commit, filename, coverage) ⇒ SourceFileCoverage
Returns a new instance of SourceFileCoverage.
3 4 5 6 7 8 |
# File 'app/models/source_file_coverage.rb', line 3 def initialize(project, commit, filename, coverage) @project, @filename, @coverage = project, filename, coverage @src = @project.read_file(filename, commit: commit).to_s.lines rescue Houston::Adapters::VersionControl::FileNotFound @src = [] end |