Sha256: 8004aa50ea558c76cbfd764e4a0f490808b19219ca5fabb25a572160e6668643

Contents?: true

Size: 496 Bytes

Versions: 2

Compression:

Stored size: 496 Bytes

Contents

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

2 entries across 2 versions & 1 rubygems

Version Path
ddtrace-1.10.1 lib/datadog/core/configuration/option_definition_set.rb
ddtrace-1.10.0 lib/datadog/core/configuration/option_definition_set.rb