Class: SimpleCov::SourceFile::Statistics
- Inherits:
-
Object
- Object
- SimpleCov::SourceFile::Statistics
- Defined in:
- lib/simplecov/source_file/statistics.rb
Overview
Builds the ‘CoverageStatistics` triple (`:line`, `:branch`, `:method`) for a SourceFile, regardless of which criteria were actually enabled during the run — disabled or empty criteria collapse to 0/0/0 so downstream consumers don’t have to special-case enable-state.
Instance Method Summary collapse
- #call ⇒ Object
-
#initialize(source_file) ⇒ Statistics
constructor
A new instance of Statistics.
Constructor Details
#initialize(source_file) ⇒ Statistics
Returns a new instance of Statistics.
10 11 12 |
# File 'lib/simplecov/source_file/statistics.rb', line 10 def initialize(source_file) @source_file = source_file end |
Instance Method Details
#call ⇒ Object
14 15 16 17 18 19 20 |
# File 'lib/simplecov/source_file/statistics.rb', line 14 def call { **line_statistics, **branch_statistics, **method_statistics } end |