Class: TraceHeader

Inherits:
Object
  • Object
show all
Includes:
Description
Defined in:
lib/trace_header.rb,
lib/trace_header/result.rb,
lib/trace_header/version.rb,
lib/trace_header/description.rb

Defined Under Namespace

Modules: Description Classes: Result

Constant Summary collapse

VERSION =
"0.1.3"

Constants included from Description

Description::MAXIMUM_LENGTH

Instance Method Summary collapse

Methods included from Description

#display

Constructor Details

#initialize(app) ⇒ TraceHeader

Returns a new instance of TraceHeader.



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

def initialize(app)
  @app       = app
  @outputs   = []
  @fixed_app = nil
end

Instance Method Details

#call(env) ⇒ Object



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

def call(env)
  tracer.enable { @app.call(env) }
  display(result)
  @fixed_app
end