Class: Datadog::CI::Contrib::Settings
- Inherits:
-
Object
- Object
- Datadog::CI::Contrib::Settings
show all
- Includes:
- Core::Configuration::Base
- Defined in:
- lib/datadog/ci/contrib/settings.rb
Overview
Common settings for all integrations
Instance Method Summary
collapse
Instance Method Details
#[](name) ⇒ Object
22
23
24
|
# File 'lib/datadog/ci/contrib/settings.rb', line 22
def [](name)
respond_to?(name) ? send(name) : get_option(name)
end
|
#[]=(name, value) ⇒ Object
26
27
28
|
# File 'lib/datadog/ci/contrib/settings.rb', line 26
def []=(name, value)
respond_to?(:"#{name}=") ? send(:"#{name}=", value) : set_option(name, value)
end
|
14
15
16
17
18
19
20
|
# File 'lib/datadog/ci/contrib/settings.rb', line 14
def configure(options = {})
self.class.options.each do |name, _value|
self[name] = options[name] if options.key?(name)
end
yield(self) if block_given?
end
|