Class: Vitals::Reporters::MultiReporter

Inherits:
BaseReporter show all
Defined in:
lib/vitals/reporters/multi_reporter.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from BaseReporter

#time

Constructor Details

#initialize(format: nil, reporters: []) ⇒ MultiReporter

Returns a new instance of MultiReporter.



5
6
7
8
# File 'lib/vitals/reporters/multi_reporter.rb', line 5

def initialize(format:nil, reporters:[])
  @format = format
  @reporters = reporters
end

Instance Attribute Details

#formatObject

Returns the value of attribute format.



3
4
5
# File 'lib/vitals/reporters/multi_reporter.rb', line 3

def format
  @format
end

Instance Method Details

#count(m, v) ⇒ Object



18
19
20
# File 'lib/vitals/reporters/multi_reporter.rb', line 18

def count(m, v)
  @reporters.each{|r| r.count(m, v) }
end

#gauge(m, v) ⇒ Object



14
15
16
# File 'lib/vitals/reporters/multi_reporter.rb', line 14

def gauge(m, v)
  @reporters.each{|r| r.gauge(m, v) }
end

#inc(m) ⇒ Object



10
11
12
# File 'lib/vitals/reporters/multi_reporter.rb', line 10

def inc(m)
  @reporters.each{|r| r.inc(m) }
end

#timing(m, v) ⇒ Object



22
23
24
# File 'lib/vitals/reporters/multi_reporter.rb', line 22

def timing(m, v)
  @reporters.each{|r| r.timing(m, v) }
end