Sha256: 1f887513e7852941d22a911f704340adf01680aa9228de5eeeb90b94efcf387c

Contents?: true

Size: 411 Bytes

Versions: 9

Compression:

Stored size: 411 Bytes

Contents

module Vitals::Reporters
  class MultiReporter < BaseReporter
    attr_accessor :format

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

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

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

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


Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
vitals-0.9.1 lib/vitals/reporters/multi_reporter.rb
vitals-0.9.0 lib/vitals/reporters/multi_reporter.rb
vitals-0.8.1 lib/vitals/reporters/multi_reporter.rb
vitals-0.8.0 lib/vitals/reporters/multi_reporter.rb
vitals-0.7.0 lib/vitals/reporters/multi_reporter.rb
vitals-0.6.0 lib/vitals/reporters/multi_reporter.rb
vitals-0.5.0 lib/vitals/reporters/multi_reporter.rb
vitals-0.4.0 lib/vitals/reporters/multi_reporter.rb
vitals-0.3.0 lib/vitals/reporters/multi_reporter.rb