Module: Datadog::Contrib::Registerable::ClassMethods

Defined in:
lib/ddtrace/contrib/registerable.rb

Overview

Class methods for registerable behavior

Instance Method Summary collapse

Instance Method Details

#register_as(name, options = {}) ⇒ Object



14
15
16
17
18
19
# File 'lib/ddtrace/contrib/registerable.rb', line 14

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

  registry.add(name, new(name, options), auto_patch)
end