Class: Moult::Coverage::Dataset
- Inherits:
-
Struct
- Object
- Struct
- Moult::Coverage::Dataset
- Defined in:
- lib/moult/coverage.rb
Overview
Normalised coverage: per (root-relative) path, the 0-indexed line array.
Instance Attribute Summary collapse
-
#entries ⇒ Object
Returns the value of attribute entries.
-
#source ⇒ Object
Returns the value of attribute source.
-
#unmatched_count ⇒ Object
Returns the value of attribute unmatched_count.
Instance Method Summary collapse
-
#line_value(path, line) ⇒ Integer?
Coverage value at that line, or nil if untracked.
-
#tracked?(path) ⇒ Boolean
Whether this file appeared in the coverage dataset.
Instance Attribute Details
#entries ⇒ Object
Returns the value of attribute entries
38 39 40 |
# File 'lib/moult/coverage.rb', line 38 def entries @entries end |
#source ⇒ Object
Returns the value of attribute source
38 39 40 |
# File 'lib/moult/coverage.rb', line 38 def source @source end |
#unmatched_count ⇒ Object
Returns the value of attribute unmatched_count
38 39 40 |
# File 'lib/moult/coverage.rb', line 38 def unmatched_count @unmatched_count end |
Instance Method Details
#line_value(path, line) ⇒ Integer?
Returns coverage value at that line, or nil if untracked.
46 47 48 49 |
# File 'lib/moult/coverage.rb', line 46 def line_value(path, line) arr = entries[path] arr && arr[line - 1] end |
#tracked?(path) ⇒ Boolean
Returns whether this file appeared in the coverage dataset.
40 41 42 |
# File 'lib/moult/coverage.rb', line 40 def tracked?(path) entries.key?(path) end |