Class: Vitals::Reporters::MultiReporter
- Inherits:
-
BaseReporter
- Object
- BaseReporter
- Vitals::Reporters::MultiReporter
- Defined in:
- lib/vitals/reporters/multi_reporter.rb
Instance Attribute Summary collapse
-
#format ⇒ Object
Returns the value of attribute format.
Instance Method Summary collapse
- #count(m, v) ⇒ Object
- #gauge(m, v) ⇒ Object
- #inc(m) ⇒ Object
-
#initialize(format: nil, reporters: []) ⇒ MultiReporter
constructor
A new instance of MultiReporter.
- #timing(m, v) ⇒ Object
Methods inherited from BaseReporter
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
#format ⇒ Object
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 |