Class: TraceHeader::Result

Inherits:
Object
  • Object
show all
Defined in:
lib/trace_header/result.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(target_app, outputs) ⇒ Result

Returns a new instance of Result.



5
6
7
8
9
# File 'lib/trace_header/result.rb', line 5

def initialize(target_app, outputs)
  @target_app  = target_app
  @target_hash = outputs.find { |output| output[:middleware].eql?(target_app.class) }
  @inner_hash  = outputs[outputs.index(@target_hash) + 1]
end

Instance Attribute Details

#target_appObject (readonly)

Returns the value of attribute target_app.



3
4
5
# File 'lib/trace_header/result.rb', line 3

def target_app
  @target_app
end

Instance Method Details

#changed_headersObject



15
16
17
# File 'lib/trace_header/result.rb', line 15

def changed_headers
  headers(changed_fields)
end

#new_headersObject



11
12
13
# File 'lib/trace_header/result.rb', line 11

def new_headers
  headers(new_fields)
end