Class: Caren::Error
- Inherits:
-
Object
- Object
- Caren::Error
- Defined in:
- lib/caren/error.rb
Overview
This class provides a wrapper for caren’s server side errors.
Direct Known Subclasses
BadRequestError, MethodNotAllowedError, NotAcceptableError, NotFoundError, UnauthorizedError
Instance Attribute Summary collapse
-
#attributes ⇒ Object
Returns the value of attribute attributes.
-
#category ⇒ Object
Returns the value of attribute category.
-
#message ⇒ Object
Returns the value of attribute message.
Instance Method Summary collapse
-
#initialize(category, message = "", attributes = {}) ⇒ Error
constructor
A new instance of Error.
Constructor Details
#initialize(category, message = "", attributes = {}) ⇒ Error
Returns a new instance of Error.
6 7 8 9 10 |
# File 'lib/caren/error.rb', line 6 def initialize category, ="", attributes={} self.category = category self. = self.attributes = attributes end |
Instance Attribute Details
#attributes ⇒ Object
Returns the value of attribute attributes.
4 5 6 |
# File 'lib/caren/error.rb', line 4 def attributes @attributes end |
#category ⇒ Object
Returns the value of attribute category.
4 5 6 |
# File 'lib/caren/error.rb', line 4 def category @category end |
#message ⇒ Object
Returns the value of attribute message.
4 5 6 |
# File 'lib/caren/error.rb', line 4 def end |