class HTTPX::Plugins::Tracing::Wrapper

  1. lib/httpx/plugins/tracing.rb
Superclass: Object

Methods

Public Class

  1. new

Public Instance

  1. freeze
  2. merge

Protected Instance

  1. tracers

Attributes

tracers [R]

Public Class methods

new(*tracers)
[show source]
   # File lib/httpx/plugins/tracing.rb
16 def initialize(*tracers)
17   @tracers = tracers.flat_map do |tracer|
18     case tracer
19     when Wrapper
20       tracer.tracers
21     else
22       tracer
23     end
24   end.uniq
25 end

Public Instance methods

freeze()
[show source]
   # File lib/httpx/plugins/tracing.rb
36 def freeze
37   @tracers.each(&:freeze).freeze
38   super
39 end
merge(tracer)
[show source]
   # File lib/httpx/plugins/tracing.rb
27 def merge(tracer)
28   case tracer
29   when Wrapper
30     Wrapper.new(*@tracers, *tracer.tracers)
31   else
32     Wrapper.new(*@tracers, tracer)
33   end
34 end