Sha256: 48092d02996d135b2947c94bbe731ea6d4ebbfb7428be88b01496070e1c2319f

Contents?: true

Size: 489 Bytes

Versions: 8

Compression:

Stored size: 489 Bytes

Contents

# frozen_string_literal: true

module Datadog
  module Transport
    module HTTP
      module Adapters
        # List of available adapters
        class Registry
          def initialize
            @adapters = {}
          end

          def get(name)
            @adapters[name]
          end

          def set(klass, name = nil)
            name ||= klass.to_s
            return if name.nil?

            @adapters[name] = klass
          end
        end
      end
    end
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
ddtrace-1.14.0 lib/ddtrace/transport/http/adapters/registry.rb
ddtrace-1.13.1 lib/ddtrace/transport/http/adapters/registry.rb
ddtrace-1.13.0 lib/ddtrace/transport/http/adapters/registry.rb
ddtrace-1.12.1 lib/ddtrace/transport/http/adapters/registry.rb
ddtrace-1.12.0 lib/ddtrace/transport/http/adapters/registry.rb
ddtrace-1.11.1 lib/ddtrace/transport/http/adapters/registry.rb
ddtrace-1.11.0 lib/ddtrace/transport/http/adapters/registry.rb
ddtrace-1.11.0.beta1 lib/ddtrace/transport/http/adapters/registry.rb