Exception: StandardError

Inherits:
Exception
  • Object
show all
Defined in:
lib/serverside/http/error.rb

Overview

StandardError extensions.

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.set_http_status(value) ⇒ Object

Sets the HTTP status code associated with the error class.



9
10
11
# File 'lib/serverside/http/error.rb', line 9

def self.set_http_status(value)
  define_method(:http_status) {value}
end

Instance Method Details

#http_statusObject

Returns the HTTP status code associated with the error class.



4
5
6
# File 'lib/serverside/http/error.rb', line 4

def http_status
  ServerSide::HTTP::STATUS_INTERNAL_SERVER_ERROR
end