Exception: Traim::Error
- Inherits:
-
StandardError
- Object
- StandardError
- Traim::Error
show all
- Defined in:
- lib/traim.rb
Instance Method Summary
collapse
Constructor Details
#initialize(options = {}) ⇒ Error
Returns a new instance of Error.
109
110
111
112
113
|
# File 'lib/traim.rb', line 109
def initialize(options = {})
@message = options[:message] || error_message
@body = options[:body] || error_message
super(@message)
end
|
Instance Method Details
#body ⇒ Object
118
|
# File 'lib/traim.rb', line 118
def body; {message: @body} end
|
#error_message ⇒ Object
116
|
# File 'lib/traim.rb', line 116
def error_message; 'Internal Server Error' end
|
117
|
# File 'lib/traim.rb', line 117
def ; end
|
#status ⇒ Object
115
|
# File 'lib/traim.rb', line 115
def status; 500 end
|