Class: Fluentdly::Rack::Middleware::Debug
- Inherits:
-
Object
- Object
- Fluentdly::Rack::Middleware::Debug
- Defined in:
- lib/fluentdly/rack/middleware/debug.rb
Class Method Summary collapse
Instance Method Summary collapse
- #call ⇒ Object
-
#initialize(env, time, result) ⇒ Debug
constructor
A new instance of Debug.
Constructor Details
#initialize(env, time, result) ⇒ Debug
Returns a new instance of Debug.
13 14 15 16 17 18 |
# File 'lib/fluentdly/rack/middleware/debug.rb', line 13 def initialize env, time, result @env = env @time = time @status, @headers, @body = result end |
Class Method Details
.call(*args) ⇒ Object
8 9 10 11 |
# File 'lib/fluentdly/rack/middleware/debug.rb', line 8 def self.call *args formatter = new(*args) formatter.call end |
Instance Method Details
#call ⇒ Object
20 21 22 23 24 25 26 27 28 29 |
# File 'lib/fluentdly/rack/middleware/debug.rb', line 20 def call %Q( Received #{data.request_method} #{data.path_info} params: #{data.params.inspect} Responded in #{time}ms status: #{status} headers: #{headers} body: #{body.inspect} ) end |