Exception: Strapi::Error
- Inherits:
-
StandardError
- Object
- StandardError
- Strapi::Error
- Defined in:
- lib/strapi/error.rb
Overview
An error raised within the Strapi ruby library
Instance Attribute Summary collapse
-
#details ⇒ Object
readonly
Returns the value of attribute details.
-
#message ⇒ Object
readonly
Returns the value of attribute message.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#status ⇒ Object
readonly
Returns the value of attribute status.
Instance Method Summary collapse
-
#initialize(hash = {}) ⇒ Error
constructor
A new instance of Error.
Constructor Details
#initialize(hash = {}) ⇒ Error
Returns a new instance of Error.
8 9 10 11 12 13 14 |
# File 'lib/strapi/error.rb', line 8 def initialize(hash = {}) super @status = hash['status'] @name = hash['name'] @message = hash['message'] @details = hash['details'] end |
Instance Attribute Details
#details ⇒ Object (readonly)
Returns the value of attribute details.
6 7 8 |
# File 'lib/strapi/error.rb', line 6 def details @details end |
#message ⇒ Object (readonly)
Returns the value of attribute message.
6 7 8 |
# File 'lib/strapi/error.rb', line 6 def @message end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
6 7 8 |
# File 'lib/strapi/error.rb', line 6 def name @name end |
#status ⇒ Object (readonly)
Returns the value of attribute status.
6 7 8 |
# File 'lib/strapi/error.rb', line 6 def status @status end |