Class: CovLoupe::Presenters::ProjectTotalsPresenter
- Inherits:
-
Object
- Object
- CovLoupe::Presenters::ProjectTotalsPresenter
- 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
-
#model ⇒ Object
readonly
Returns the value of attribute model.
-
#raise_on_stale ⇒ Object
readonly
Returns the value of attribute raise_on_stale.
-
#tracked_globs ⇒ Object
readonly
Returns the value of attribute tracked_globs.
Instance Method Summary collapse
-
#initialize(model:, raise_on_stale:, tracked_globs:) ⇒ ProjectTotalsPresenter
constructor
A new instance of ProjectTotalsPresenter.
-
#timestamp_status ⇒ Object
Returns the timestamp status indicating whether coverage timestamps are available.
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
#model ⇒ Object (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_stale ⇒ Object (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_globs ⇒ Object (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_status ⇒ Object
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 relativized_payload['timestamp_status'] end |