Class: Datadog::Tracing::Configuration::Dynamic::Option

Inherits:
Object
  • Object
show all
Defined in:
lib/datadog/tracing/configuration/dynamic/option.rb

Overview

Maps a remote dynamic configuration to a location configuration option.

Direct Known Subclasses

SimpleOption

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(name, env_var) ⇒ Option

Returns a new instance of Option.

Parameters:

  • name (String)

    dynamic configuration option name. This must match the remote configuration payload.



12
13
14
15
# File 'lib/datadog/tracing/configuration/dynamic/option.rb', line 12

def initialize(name, env_var)
  @name = name
  @env_var = env_var
end

Instance Attribute Details

#env_varObject (readonly)

Returns the value of attribute env_var.



9
10
11
# File 'lib/datadog/tracing/configuration/dynamic/option.rb', line 9

def env_var
  @env_var
end

#nameObject (readonly)

Returns the value of attribute name.



9
10
11
# File 'lib/datadog/tracing/configuration/dynamic/option.rb', line 9

def name
  @name
end

Instance Method Details

#call(value) ⇒ Object

Reconfigures the provided option, setting its value to ‘value`.

Parameters:

  • value (Object, nil)

    the new value for this option

Raises:

  • (NotImplementedError)


20
21
22
# File 'lib/datadog/tracing/configuration/dynamic/option.rb', line 20

def call(value)
  raise NotImplementedError
end