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.
190
191
192
193
194
|
# File 'lib/traim.rb', line 190
def initialize(options = {})
@message = options[:message] || error_message
@body = options[:body] || error_message
super(@message)
end
|
Instance Method Details
#body ⇒ Object
199
|
# File 'lib/traim.rb', line 199
def body; {message: @body} end
|
#error_message ⇒ Object
197
|
# File 'lib/traim.rb', line 197
def error_message; 'Internal Server Error' end
|
#status ⇒ Object
196
|
# File 'lib/traim.rb', line 196
def status; 500 end
|