class RailsWatcher::WatcherMiddleware

Public Class Methods

new(app) click to toggle source
# File lib/rails_watcher/watcher_middleware.rb, line 4
def initialize app
  @app = app
end

Public Instance Methods

call(env) click to toggle source
# File lib/rails_watcher/watcher_middleware.rb, line 8
def call env
  CallStack.set_instance env["REQUEST_PATH"]
  status, headers, response = nil, nil, nil
  duration = Benchmark.ms { status, headers, response = @app.call env }
  CallStack.clear_instance_and_log duration
  return status, headers, response
end