Sha256: fabf74c16cb3674c1a12b7809d5395949fd3b0385459d0791e978a8cb68e7ba7
Contents?: true
Size: 823 Bytes
Versions: 21
Compression:
Stored size: 823 Bytes
Contents
require 'ddtrace/contrib/configuration/options' module Datadog module Contrib module Configuration # Common settings for all integrations class Settings include Options option :service_name option :tracer, default: Datadog.tracer def initialize(options = {}) configure(options) end 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 def [](name) respond_to?(name) ? send(name) : get_option(name) end def []=(name, value) respond_to?("#{name}=") ? send("#{name}=", value) : set_option(name, value) end end end end end
Version data entries
21 entries across 21 versions & 1 rubygems