Sha256: 428b201bc75b7fbafbdb65aee8ac0e7fb96c8c1e8bd1846265922c9bc94fc5ac

Contents?: true

Size: 525 Bytes

Versions: 41

Compression:

Stored size: 525 Bytes

Contents

module Datadog
  class Registry
    # Registerable provides a convenience method for self-registering
    module Registerable
      def self.included(base)
        base.singleton_class.send(:include, ClassMethods)
      end

      # ClassMethods
      module ClassMethods
        def register_as(name, options = {})
          registry = options.fetch(:registry, Datadog.registry)
          auto_patch = options.fetch(:auto_patch, false)

          registry.add(name, self, auto_patch)
        end
      end
    end
  end
end

Version data entries

41 entries across 41 versions & 1 rubygems

Version Path
ddtrace-0.20.0 lib/ddtrace/registry/registerable.rb
ddtrace-0.19.1 lib/ddtrace/registry/registerable.rb
ddtrace-0.19.0 lib/ddtrace/registry/registerable.rb
ddtrace-0.18.3 lib/ddtrace/registry/registerable.rb
ddtrace-0.18.2 lib/ddtrace/registry/registerable.rb
ddtrace-0.18.1 lib/ddtrace/registry/registerable.rb
ddtrace-0.18.0 lib/ddtrace/registry/registerable.rb
ddtrace-0.17.3 lib/ddtrace/registry/registerable.rb
ddtrace-0.17.2 lib/ddtrace/registry/registerable.rb
ddtrace-0.17.1 lib/ddtrace/registry/registerable.rb
ddtrace-0.17.0 lib/ddtrace/registry/registerable.rb
ddtrace-0.16.1 lib/ddtrace/registry/registerable.rb
ddtrace-0.15.0.internaltracinfeature1 lib/ddtrace/registry/registerable.rb
ddtrace-0.16.0 lib/ddtrace/registry/registerable.rb
ddtrace-0.14.2.disableprotocolversion4 lib/ddtrace/registry/registerable.rb
ddtrace-0.15.0 lib/ddtrace/registry/registerable.rb
ddtrace-0.14.2.withoutpriorityparsing1 lib/ddtrace/registry/registerable.rb
ddtrace-0.14.2 lib/ddtrace/registry/registerable.rb
ddtrace-0.14.1 lib/ddtrace/registry/registerable.rb
ddtrace-0.15.0.beta1 lib/ddtrace/registry/registerable.rb