Class: Polyrun::Coverage::Result

Inherits:
Object
  • Object
show all
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

Instance Method Summary collapse

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 = meta.is_a?(Hash) ? meta : {}
  @groups = groups
end

Instance Attribute Details

#coverage_blobObject (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

#groupsObject (readonly)

Returns the value of attribute groups.



5
6
7
# File 'lib/polyrun/coverage/result.rb', line 5

def groups
  @groups
end

#metaObject (readonly)

Returns the value of attribute meta.



5
6
7
# File 'lib/polyrun/coverage/result.rb', line 5

def meta
  @meta
end

Instance Method Details

#filesObject



13
14
15
# File 'lib/polyrun/coverage/result.rb', line 13

def files
  coverage_blob.keys
end