Exception: Netfira::WebConnect::RackApp::Exceptions::HttpException

Inherits:
Base
  • Object
show all
Extended by:
Forwardable
Defined in:
lib/netfira/web_connect/rack_app/exceptions/http_exception.rb

Class Attribute Summary collapse

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(message = nil, details = nil) ⇒ HttpException

Returns a new instance of HttpException.



16
17
18
19
20
# File 'lib/netfira/web_connect/rack_app/exceptions/http_exception.rb', line 16

def initialize(message = nil, details = nil)
  super message || self.class.name.demodulize.underscore.humanize
  @headers = self.class.headers.dup
  @details = details
end

Class Attribute Details

.categoryObject

Returns the value of attribute category.



10
11
12
# File 'lib/netfira/web_connect/rack_app/exceptions/http_exception.rb', line 10

def category
  @category
end

.codeObject

Returns the value of attribute code.



10
11
12
# File 'lib/netfira/web_connect/rack_app/exceptions/http_exception.rb', line 10

def code
  @code
end

.headersObject (readonly)

Returns the value of attribute headers.



11
12
13
# File 'lib/netfira/web_connect/rack_app/exceptions/http_exception.rb', line 11

def headers
  @headers
end

.statusObject

Returns the value of attribute status.



10
11
12
# File 'lib/netfira/web_connect/rack_app/exceptions/http_exception.rb', line 10

def status
  @status
end

Instance Attribute Details

#headersObject (readonly)

Returns the value of attribute headers.



26
27
28
# File 'lib/netfira/web_connect/rack_app/exceptions/http_exception.rb', line 26

def headers
  @headers
end

Instance Method Details

#bodyObject



22
23
24
# File 'lib/netfira/web_connect/rack_app/exceptions/http_exception.rb', line 22

def body
  @body ||= make_body
end