Class: Publication::CloudflareTrafficSummary::Result
- Inherits:
-
Data
- Object
- Data
- Publication::CloudflareTrafficSummary::Result
- Defined in:
- app/services/publication/cloudflare_traffic_summary.rb
Overview
Immutable rolling-window totals for one publication.
+site_map_id+ is the SiteMap the metric is anchored to — used to link
into the metrics-analysis explorer; nil when nothing has been recorded.
Instance Attribute Summary collapse
-
#last_synced_on ⇒ Object
readonly
Returns the value of attribute last_synced_on.
-
#pdf_requests_30d ⇒ Object
readonly
Returns the value of attribute pdf_requests_30d.
-
#pdf_requests_90d ⇒ Object
readonly
Returns the value of attribute pdf_requests_90d.
-
#site_map_id ⇒ Object
readonly
Returns the value of attribute site_map_id.
Instance Method Summary collapse
-
#initialize(pdf_requests_30d: 0, pdf_requests_90d: 0, last_synced_on: nil, site_map_id: nil) ⇒ Result
constructor
A new instance of Result.
-
#recorded? ⇒ Boolean
Whether any Cloudflare data has been synced yet.
Constructor Details
#initialize(pdf_requests_30d: 0, pdf_requests_90d: 0, last_synced_on: nil, site_map_id: nil) ⇒ Result
Returns a new instance of Result.
29 30 31 32 |
# File 'app/services/publication/cloudflare_traffic_summary.rb', line 29 def initialize(pdf_requests_30d: 0, pdf_requests_90d: 0, last_synced_on: nil, site_map_id: nil) super end |
Instance Attribute Details
#last_synced_on ⇒ Object (readonly)
Returns the value of attribute last_synced_on
27 28 29 |
# File 'app/services/publication/cloudflare_traffic_summary.rb', line 27 def last_synced_on @last_synced_on end |
#pdf_requests_30d ⇒ Object (readonly)
Returns the value of attribute pdf_requests_30d
27 28 29 |
# File 'app/services/publication/cloudflare_traffic_summary.rb', line 27 def pdf_requests_30d @pdf_requests_30d end |
#pdf_requests_90d ⇒ Object (readonly)
Returns the value of attribute pdf_requests_90d
27 28 29 |
# File 'app/services/publication/cloudflare_traffic_summary.rb', line 27 def pdf_requests_90d @pdf_requests_90d end |
#site_map_id ⇒ Object (readonly)
Returns the value of attribute site_map_id
27 28 29 |
# File 'app/services/publication/cloudflare_traffic_summary.rb', line 27 def site_map_id @site_map_id end |
Instance Method Details
#recorded? ⇒ Boolean
Returns whether any Cloudflare data has been synced yet.
35 |
# File 'app/services/publication/cloudflare_traffic_summary.rb', line 35 def recorded? = last_synced_on.present? |