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



110
111
112
# File 'lib/wunderbar/environment.rb', line 110

def self.status
  @@status
end

.status=(status) ⇒ Object



102
103
104
# File 'lib/wunderbar/environment.rb', line 102

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

.textObject



114
115
116
# File 'lib/wunderbar/environment.rb', line 114

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

.text=(text) ⇒ Object



106
107
108
# File 'lib/wunderbar/environment.rb', line 106

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