module Datadog::Configuration::Base::ClassMethods
Class methods for configuration
Protected Instance Methods
settings(name, &block)
click to toggle source
Allows subgroupings of settings to be defined. e.g. `settings :foo { option :bar }` –> `config.foo.bar`
# File lib/ddtrace/configuration/base.rb, line 23 def settings(name, &block) settings_class = new_settings_class(&block) option(name) do |o| o.default { settings_class.new } o.lazy o.resetter do |value| value.reset! if value.respond_to?(:reset!) value end end end
Private Instance Methods
new_settings_class(&block)
click to toggle source
# File lib/ddtrace/configuration/base.rb, line 38 def new_settings_class(&block) Class.new { include Datadog::Configuration::Base }.tap do |klass| klass.instance_eval(&block) if block_given? end end