Class Index [+]

Quicksearch

Rack::Response::Helpers

Attributes

headers[R]

Headers

original_headers[R]

Headers

Public Instance Methods

bad_request?() click to toggle source
     # File lib/rack/response.rb, line 124
124:       def bad_request?;        status == 400;                        end
client_error?() click to toggle source
     # File lib/rack/response.rb, line 120
120:       def client_error?;       status >= 400 && status < 500;        end
content_length() click to toggle source
     # File lib/rack/response.rb, line 143
143:       def content_length
144:         cl = headers["Content-Length"]
145:         cl ? cl.to_i : cl
146:       end
content_type() click to toggle source
     # File lib/rack/response.rb, line 139
139:       def content_type
140:         headers["Content-Type"]
141:       end
forbidden?() click to toggle source
     # File lib/rack/response.rb, line 125
125:       def forbidden?;          status == 403;                        end
include?(header) click to toggle source
     # File lib/rack/response.rb, line 135
135:       def include?(header)
136:         !!headers[header]
137:       end
informational?() click to toggle source
     # File lib/rack/response.rb, line 117
117:       def informational?;      status >= 100 && status < 200;        end
invalid?() click to toggle source
     # File lib/rack/response.rb, line 115
115:       def invalid?;            status < 100 || status >= 600;        end
location() click to toggle source
     # File lib/rack/response.rb, line 148
148:       def location
149:         headers["Location"]
150:       end
method_not_allowed?() click to toggle source
     # File lib/rack/response.rb, line 127
127:       def method_not_allowed?; status == 405;                        end
not_found?() click to toggle source
     # File lib/rack/response.rb, line 126
126:       def not_found?;          status == 404;                        end
ok?() click to toggle source
     # File lib/rack/response.rb, line 123
123:       def ok?;                 status == 200;                        end
redirect?() click to toggle source
     # File lib/rack/response.rb, line 130
130:       def redirect?;           [301, 302, 303, 307].include? status; end
redirection?() click to toggle source
     # File lib/rack/response.rb, line 119
119:       def redirection?;        status >= 300 && status < 400;        end
server_error?() click to toggle source
     # File lib/rack/response.rb, line 121
121:       def server_error?;       status >= 500 && status < 600;        end
successful?() click to toggle source
     # File lib/rack/response.rb, line 118
118:       def successful?;         status >= 200 && status < 300;        end
unprocessable?() click to toggle source
     # File lib/rack/response.rb, line 128
128:       def unprocessable?;      status == 422;                        end

Disabled; run with --debug to generate this.

[Validate]

Generated with the Darkfish Rdoc Generator 1.1.6.