class Mojito::MojitoException

Attributes

status[R]

Public Class Methods

new(status = 500, message = STATUS[status].message) click to toggle source
Calls superclass method
# File lib/mojito/helpers/exception_handling.rb, line 7
def initialize(status = 500, message = STATUS[status].message)
        super(message)
        @status = Mojito::STATUS[status].code
end

Public Instance Methods

to_response() click to toggle source
# File lib/mojito/helpers/exception_handling.rb, line 14
def to_response
        Rack::Response.new [], status, 'Content-Type' => 'application/octet-stream'
end