Class: Racket::Response
- Inherits:
-
Rack::Response
- Object
- Rack::Response
- Racket::Response
- Defined in:
- lib/racket/response.rb
Overview
Represents a response from the application
Class Method Summary collapse
-
.generate_error_response(status) ⇒ Array
Generates a basic error response.
Class Method Details
.generate_error_response(status) ⇒ Array
Generates a basic error response.
26 27 28 29 30 |
# File 'lib/racket/response.rb', line 26 def self.generate_error_response(status) response = new([], status, 'Content-Type' => 'text/plain') response.write("#{status} #{Rack::Utils::HTTP_STATUS_CODES[status]}") response.finish end |