Module: Wunderbar::ServerError

Defined in:
lib/wunderbar/environment.rb

Overview

Some proxies will replace server errors with their own output, and some applications will want to indicate that there is useful, parseable, content in controlled failures. For this reason, allow the server error responses to be customized by the application.

Constant Summary collapse

@@status =
500
@@text =
'Internal Server Error'

Class Method Summary collapse

Class Method Details

.statusObject



76
77
78
# File 'lib/wunderbar/environment.rb', line 76

def self.status
  @@status
end

.status=(status) ⇒ Object



68
69
70
# File 'lib/wunderbar/environment.rb', line 68

def self.status=(status)
  @@status = status
end

.textObject



80
81
82
# File 'lib/wunderbar/environment.rb', line 80

def self.text
  "#{@@status} #{@@text}"
end

.text=(text) ⇒ Object



72
73
74
# File 'lib/wunderbar/environment.rb', line 72

def self.text=(text)
  @@text = text
end