Module: PikaQue::Metrics
- Included in:
- Subscriber
- Defined in:
- lib/pika_que/metrics.rb,
lib/pika_que/metrics/log_metric.rb,
lib/pika_que/metrics/null_metric.rb
Defined Under Namespace
Classes: LogMetric, NullMetric
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.init_metrics ⇒ Object
11 12 13 14 15 16 17 18 19 |
# File 'lib/pika_que/metrics.rb', line 11 def self.init_metrics if PikaQue.config[:metrics] @metrics = PikaQue.config[:metrics].new elsif PikaQue.config[:quiet] @metrics = PikaQue::Metrics::NullMetric.new else @metrics = PikaQue::Metrics::LogMetric.new end end |
.metrics ⇒ Object
7 8 9 |
# File 'lib/pika_que/metrics.rb', line 7 def self.metrics @metrics || init_metrics end |