Class: Rack::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.



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

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.



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

def target_app
  @target_app
end

Instance Method Details

#changed_headersObject



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

def changed_headers
  headers(changed_fields)
end

#new_headersObject



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

def new_headers
  headers(new_fields)
end