Class: CovLoupe::Presenters::ProjectTotalsPresenter

Inherits:
Object
  • Object
show all
Includes:
PayloadCaching
Defined in:
lib/cov_loupe/presenters/project_totals_presenter.rb

Overview

Provides aggregated line totals and average coverage across the project.

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from PayloadCaching

#absolute_payload, #relativized_payload

Constructor Details

#initialize(model:, raise_on_stale:, tracked_globs:) ⇒ ProjectTotalsPresenter

Returns a new instance of ProjectTotalsPresenter.



13
14
15
16
17
# File 'lib/cov_loupe/presenters/project_totals_presenter.rb', line 13

def initialize(model:, raise_on_stale:, tracked_globs:)
  @model = model
  @raise_on_stale = raise_on_stale
  @tracked_globs = tracked_globs
end

Instance Attribute Details

#modelObject (readonly)

Returns the value of attribute model.



11
12
13
# File 'lib/cov_loupe/presenters/project_totals_presenter.rb', line 11

def model
  @model
end

#raise_on_staleObject (readonly)

Returns the value of attribute raise_on_stale.



11
12
13
# File 'lib/cov_loupe/presenters/project_totals_presenter.rb', line 11

def raise_on_stale
  @raise_on_stale
end

#tracked_globsObject (readonly)

Returns the value of attribute tracked_globs.



11
12
13
# File 'lib/cov_loupe/presenters/project_totals_presenter.rb', line 11

def tracked_globs
  @tracked_globs
end

Instance Method Details

#timestamp_statusObject

Returns the timestamp status indicating whether coverage timestamps are available. Can be 'ok' (timestamps available) or 'missing' (no timestamps, staleness checks skipped).



21
22
23
# File 'lib/cov_loupe/presenters/project_totals_presenter.rb', line 21

def timestamp_status
  relativized_payload['timestamp_status']
end