Sha256: 087325c56e1dca5d7b9f6138c908e649e2e99e638cb219577209c663b9fcf3fa

Contents?: true

Size: 511 Bytes

Versions: 12

Compression:

Stored size: 511 Bytes

Contents

# typed: true

require_relative 'dependency_resolver'

module Datadog
  module Core
    module Configuration
      # Represents a set of configuration option definitions for an integration
      class OptionDefinitionSet < Hash
        def dependency_order
          DependencyResolver.new(dependency_graph).call
        end

        def dependency_graph
          each_with_object({}) do |(name, option), graph|
            graph[name] = option.depends_on
          end
        end
      end
    end
  end
end

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
ddtrace-1.9.0 lib/datadog/core/configuration/option_definition_set.rb
ddtrace-1.8.0 lib/datadog/core/configuration/option_definition_set.rb
ddtrace-1.7.0 lib/datadog/core/configuration/option_definition_set.rb
ddtrace-1.6.1 lib/datadog/core/configuration/option_definition_set.rb
ddtrace-1.6.0 lib/datadog/core/configuration/option_definition_set.rb
ddtrace-1.5.2 lib/datadog/core/configuration/option_definition_set.rb
ddtrace-1.5.1 lib/datadog/core/configuration/option_definition_set.rb
ddtrace-1.5.0 lib/datadog/core/configuration/option_definition_set.rb
ddtrace-1.4.2 lib/datadog/core/configuration/option_definition_set.rb
ddtrace-1.4.1 lib/datadog/core/configuration/option_definition_set.rb
ddtrace-1.4.0 lib/datadog/core/configuration/option_definition_set.rb
ddtrace-1.3.0 lib/datadog/core/configuration/option_definition_set.rb