Method: Datadog::Tracing::Contrib::Configuration::CachingResolver#add
- Defined in:
- lib/datadog/tracing/contrib/configuration/resolver.rb
#add(matcher, value) ⇒ Object
Adds a new ‘matcher`, associating with it a `value`.
This ‘value` is returned when `#resolve` is called with a matching value for this matcher. When multiple matchers would match, `#resolve` returns the latest added one.
The ‘matcher` can be transformed internally by the `#parse_matcher` method before being stored.
The ‘value` can also be retrieved by calling `#get` with the same `matcher` added by this method.
115 116 117 118 |
# File 'lib/datadog/tracing/contrib/configuration/resolver.rb', line 115 def add(matcher, value) reset_cache # Bust the cache when a new matcher is added super end |