Class: Datadog::Configuration::PinSetup
- Inherits:
-
Object
- Object
- Datadog::Configuration::PinSetup
- Defined in:
- lib/ddtrace/configuration/pin_setup.rb
Overview
PinSetup translates a flat hash into a Pin configuration This class should be removed if we ever remove/refactor the Pin class
Instance Method Summary collapse
- #call ⇒ Object
-
#initialize(target, opts = {}) ⇒ PinSetup
constructor
A new instance of PinSetup.
Constructor Details
Instance Method Details
#call ⇒ Object
12 13 14 15 16 17 18 19 20 |
# File 'lib/ddtrace/configuration/pin_setup.rb', line 12 def call return unless pin ATTRS.each { |key| pin.public_send("#{key}=", opts[key]) if opts[key] } pin.config = opts.reject { |key, _| ATTRS.include?(key) || DEPRECATED_ATTRS.include?(key) } true end |