class Nucleo::Models::FeedTypes::Analytics::Site::Pages
Constants
- DIMENSION_NAME
- METRIC_NAME
Public Instance Methods
any?()
click to toggle source
# File lib/nucleo/models/feed_types/analytics/site/pages.rb, line 44 def any? self.current_period.rows? end
current_period()
click to toggle source
Delegates to the Metric
Period
@return [Nucleo::Models::MetricPeriod]
# File lib/nucleo/models/feed_types/analytics/site/pages.rb, line 40 def current_period self.metric.metric_periods.current_period end
metric()
click to toggle source
Returns the specific Metric
for this page
@return [Nucleo::Models::Metric]
# File lib/nucleo/models/feed_types/analytics/site/pages.rb, line 17 def metric params = { 'metric' => METRIC_NAME, 'dimension' => DIMENSION_NAME, 'classification' => @attributes['classification'], 'totals' => data.fetch('totals', {}), 'current_period' => data.fetch('current_period', {}), 'prior_period' => data.fetch('prior_period', {}) } Nucleo::Models::Metric.new(params) end
prior_period()
click to toggle source
Delegates to the Metric
Period
@return [Nucleo::Models::MetricPeriod]
# File lib/nucleo/models/feed_types/analytics/site/pages.rb, line 51 def prior_period self.metric.metric_periods.prior_period end
Also aliased as: previous_period
totals()
click to toggle source
Delegates to the Totals
@return [Nucleo::Models::MetricPeriodsTotals]
# File lib/nucleo/models/feed_types/analytics/site/pages.rb, line 33 def totals self.metric.metric_periods.totals end