Sha256: be1ce70759e099de9ff7017eeca25f12e3f6676fc99e12842915646def58e910

Contents?: true

Size: 678 Bytes

Versions: 17

Compression:

Stored size: 678 Bytes

Contents

# encoding: utf-8
module Moped
  module Instrumentable

    # Does not instrument anything, just yields.
    #
    # @since 2.0.0
    class Noop

      class << self

        # Do not instrument anything.
        #
        # @example Do not instrument.
        #   Noop.instrument("moped.noop") do
        #     node.connect
        #   end
        #
        # @param [ String ] name The name of the operation.
        # @param [ Hash ] payload The payload.
        #
        # @return [ Object ] The result of the yield.
        #
        # @since 2.0.0
        def instrument(name, payload = {})
          yield payload if block_given?
        end
      end
    end
  end
end

Version data entries

17 entries across 17 versions & 2 rubygems

Version Path
ish_lib_manager-0.0.1 test/dummy/vendor/bundle/ruby/2.3.0/bundler/gems/moped-cf817ca58a85/lib/moped/instrumentable/noop.rb
moped-2.0.7 lib/moped/instrumentable/noop.rb
moped-2.0.6 lib/moped/instrumentable/noop.rb
moped-2.0.5 lib/moped/instrumentable/noop.rb
moped-2.0.4 lib/moped/instrumentable/noop.rb
moped-2.0.3 lib/moped/instrumentable/noop.rb
moped-2.0.2 lib/moped/instrumentable/noop.rb
moped-2.0.1 lib/moped/instrumentable/noop.rb
moped-2.0.0 lib/moped/instrumentable/noop.rb
moped-2.0.0.rc2 lib/moped/instrumentable/noop.rb
moped-2.0.0.rc1 lib/moped/instrumentable/noop.rb
moped-2.0.0.beta6 lib/moped/instrumentable/noop.rb
moped-2.0.0.beta5 lib/moped/instrumentable/noop.rb
moped-2.0.0.beta4 lib/moped/instrumentable/noop.rb
moped-2.0.0.beta3 lib/moped/instrumentable/noop.rb
moped-2.0.0.beta2 lib/moped/instrumentable/noop.rb
moped-2.0.0.beta lib/moped/instrumentable/noop.rb