Exception: Netfira::WebConnect::RackApp::Exceptions::HttpException
- Inherits:
-
Base
- Object
- RuntimeError
- Base
- Netfira::WebConnect::RackApp::Exceptions::HttpException
- Extended by:
- Forwardable
- Defined in:
- lib/netfira/web_connect/rack_app/exceptions/http_exception.rb
Class Attribute Summary collapse
-
.category ⇒ Object
Returns the value of attribute category.
-
.code ⇒ Object
Returns the value of attribute code.
-
.headers ⇒ Object
readonly
Returns the value of attribute headers.
-
.status ⇒ Object
Returns the value of attribute status.
Instance Attribute Summary collapse
-
#headers ⇒ Object
readonly
Returns the value of attribute headers.
Instance Method Summary collapse
- #body ⇒ Object
-
#initialize(message = nil, details = nil) ⇒ HttpException
constructor
A new instance of HttpException.
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( = nil, details = nil) super || self.class.name.demodulize.underscore.humanize @headers = self.class.headers.dup @details = details end |
Class Attribute Details
.category ⇒ Object
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 |
.code ⇒ Object
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 |
.headers ⇒ Object (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 |
.status ⇒ Object
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
#headers ⇒ Object (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
#body ⇒ Object
22 23 24 |
# File 'lib/netfira/web_connect/rack_app/exceptions/http_exception.rb', line 22 def body @body ||= make_body end |