Method: WEBrick::HTTPStatus.error?

Defined in:
lib/webrick/httpstatus.rb

.error?(code) ⇒ Boolean

Is code an error status?

Returns:

  • (Boolean)


164
165
166
# File 'lib/webrick/httpstatus.rb', line 164

def error?(code)
  code.to_i >= 400 and code.to_i < 600
end