lib/rack/runtime.rb in rack-2.0.9.4 vs lib/rack/runtime.rb in rack-2.1.0

- old
+ new

@@ -1,16 +1,18 @@ +# frozen_string_literal: true + require 'rack/utils' module Rack # Sets an "X-Runtime" response header, indicating the response # time of the request, in seconds # # You can put it right before the application to see the processing # time, or before all the other middlewares to include time for them, # too. class Runtime - FORMAT_STRING = "%0.6f".freeze # :nodoc: - HEADER_NAME = "X-Runtime".freeze # :nodoc: + FORMAT_STRING = "%0.6f" # :nodoc: + HEADER_NAME = "X-Runtime" # :nodoc: def initialize(app, name = nil) @app = app @header_name = HEADER_NAME @header_name += "-#{name}" if name