Class: Datadog::Contrib::Configuration::Settings

Inherits:
Object
  • Object
show all
Includes:
Datadog::Configuration::Base
Defined in:
lib/ddtrace/contrib/configuration/settings.rb

Overview

Common settings for all integrations

Instance Method Summary collapse

Methods included from Datadog::Configuration::Base

included

Instance Method Details

#[](name) ⇒ Object



25
26
27
# File 'lib/ddtrace/contrib/configuration/settings.rb', line 25

def [](name)
  respond_to?(name) ? send(name) : get_option(name)
end

#[]=(name, value) ⇒ Object



29
30
31
# File 'lib/ddtrace/contrib/configuration/settings.rb', line 29

def []=(name, value)
  respond_to?("#{name}=") ? send("#{name}=", value) : set_option(name, value)
end

#configure(options = {}) {|_self| ... } ⇒ Object

Yields:

  • (_self)

Yield Parameters:



17
18
19
20
21
22
23
# File 'lib/ddtrace/contrib/configuration/settings.rb', line 17

def configure(options = {})
  self.class.options.dependency_order.each do |name|
    self[name] = options.fetch(name, self[name])
  end

  yield(self) if block_given?
end