Class: Polyrun::Coverage::Result
- Inherits:
-
Object
- Object
- Polyrun::Coverage::Result
- Defined in:
- lib/polyrun/coverage/result.rb
Overview
Payload passed to formatters (SimpleCov-compatible): merged line coverage plus JSON meta/groups.
Instance Attribute Summary collapse
-
#coverage_blob ⇒ Object
readonly
Returns the value of attribute coverage_blob.
-
#groups ⇒ Object
readonly
Returns the value of attribute groups.
-
#meta ⇒ Object
readonly
Returns the value of attribute meta.
Instance Method Summary collapse
- #files ⇒ Object
-
#initialize(coverage_blob, meta: {}, groups: nil) ⇒ Result
constructor
A new instance of Result.
Constructor Details
#initialize(coverage_blob, meta: {}, groups: nil) ⇒ Result
Returns a new instance of Result.
7 8 9 10 11 |
# File 'lib/polyrun/coverage/result.rb', line 7 def initialize(coverage_blob, meta: {}, groups: nil) @coverage_blob = coverage_blob @meta = .is_a?(Hash) ? : {} @groups = groups end |
Instance Attribute Details
#coverage_blob ⇒ Object (readonly)
Returns the value of attribute coverage_blob.
5 6 7 |
# File 'lib/polyrun/coverage/result.rb', line 5 def coverage_blob @coverage_blob end |
#groups ⇒ Object (readonly)
Returns the value of attribute groups.
5 6 7 |
# File 'lib/polyrun/coverage/result.rb', line 5 def groups @groups end |
#meta ⇒ Object (readonly)
Returns the value of attribute meta.
5 6 7 |
# File 'lib/polyrun/coverage/result.rb', line 5 def @meta end |
Instance Method Details
#files ⇒ Object
13 14 15 |
# File 'lib/polyrun/coverage/result.rb', line 13 def files coverage_blob.keys end |