Class: SourceMonitor::Analytics::SourceFetchIntervalDistribution
- Inherits:
-
Object
- Object
- SourceMonitor::Analytics::SourceFetchIntervalDistribution
- Defined in:
- lib/source_monitor/analytics/source_fetch_interval_distribution.rb
Defined Under Namespace
Classes: Bucket
Constant Summary collapse
- BUCKETS =
[ { label: "5-30 min", min: 5, max: 30 }, { label: "30-60 min", min: 30, max: 60 }, { label: "60-120 min", min: 60, max: 120 }, { label: "120-240 min", min: 120, max: 240 }, { label: "240-480 min", min: 240, max: 480 }, { label: "480+ min", min: 480, max: nil } ].freeze
Instance Method Summary collapse
- #buckets ⇒ Object
-
#initialize(scope: SourceMonitor::Source.all) ⇒ SourceFetchIntervalDistribution
constructor
A new instance of SourceFetchIntervalDistribution.
Constructor Details
#initialize(scope: SourceMonitor::Source.all) ⇒ SourceFetchIntervalDistribution
Returns a new instance of SourceFetchIntervalDistribution.
17 18 19 |
# File 'lib/source_monitor/analytics/source_fetch_interval_distribution.rb', line 17 def initialize(scope: SourceMonitor::Source.all) @scope = scope end |
Instance Method Details
#buckets ⇒ Object
21 22 23 |
# File 'lib/source_monitor/analytics/source_fetch_interval_distribution.rb', line 21 def buckets @buckets ||= build_buckets end |