Sha256: 64cd5e8d6a3469f1278b177a5e9b9573a233704a5520a2660fcead6021275f73

Contents?: true

Size: 450 Bytes

Versions: 13

Compression:

Stored size: 450 Bytes

Contents

module Vx
  module Consumer
    module Instrument

      def instrument(name, payload, &block)
        name = "#{name}.consumer.vx"

        if Consumer.configuration.debug?
          $stdout.puts " --> #{name}: #{payload}"
        end

        if Consumer.configuration.instrumenter
          Consumer.configuration.instrumenter.instrument(name, payload, &block)
        else
          yield if block_given?
        end
      end

    end
  end
end

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
vx-consumer-0.2.0 lib/vx/consumer/instrument.rb
vx-consumer-0.2.0.pre0 lib/vx/consumer/instrument.rb
vx-consumer-0.1.8 lib/vx/consumer/instrument.rb
vx-consumer-0.1.7 lib/vx/consumer/instrument.rb
vx-consumer-0.1.6 lib/vx/consumer/instrument.rb
vx-consumer-0.1.5 lib/vx/consumer/instrument.rb
vx-consumer-0.1.4 lib/vx/consumer/instrument.rb
vx-consumer-0.1.3 lib/vx/consumer/instrument.rb
vx-consumer-0.1.2 lib/vx/consumer/instrument.rb
vx-consumer-0.1.1 lib/vx/consumer/instrument.rb
vx-consumer-0.1.0 lib/vx/consumer/instrument.rb
vx-consumer-0.0.2 lib/vx/consumer/instrument.rb
vx-consumer-0.0.1 lib/vx/consumer/instrument.rb