Module: Datadog::Core::Transport::HTTP::API::Fallbacks

Included in:
Map
Defined in:
lib/datadog/core/transport/http/api/fallbacks.rb

Overview

Extension for Map with adds fallback versions.

Instance Method Summary collapse

Instance Method Details

#add_fallbacks!(fallbacks) ⇒ Object



18
19
20
# File 'lib/datadog/core/transport/http/api/fallbacks.rb', line 18

def add_fallbacks!(fallbacks)
  self.fallbacks.merge!(fallbacks)
end

#fallbacksObject



10
11
12
# File 'lib/datadog/core/transport/http/api/fallbacks.rb', line 10

def fallbacks
  @fallbacks ||= {}
end

#with_fallbacks(fallbacks) ⇒ Object



14
15
16
# File 'lib/datadog/core/transport/http/api/fallbacks.rb', line 14

def with_fallbacks(fallbacks)
  tap { add_fallbacks!(fallbacks) }
end