Class: Puzzle::Error
- Inherits:
-
Object
- Object
- Puzzle::Error
- Defined in:
- lib/puzzle/error.rb
Instance Attribute Summary collapse
-
#code ⇒ Object
Returns the value of attribute code.
-
#http_status_code ⇒ Object
Returns the value of attribute http_status_code.
-
#message ⇒ Object
Returns the value of attribute message.
-
#stack_trace ⇒ Object
Returns the value of attribute stack_trace.
Instance Method Summary collapse
-
#initialize(error) ⇒ Error
constructor
A new instance of Error.
Constructor Details
#initialize(error) ⇒ Error
Returns a new instance of Error.
4 5 6 7 8 9 |
# File 'lib/puzzle/error.rb', line 4 def initialize(error) @code = error["errorCode"] @message = error["errorMsg"] @stack_trace = error["stackTrace"] @http_status_code = error["httpStatusCode"] end |
Instance Attribute Details
#code ⇒ Object
Returns the value of attribute code.
3 4 5 |
# File 'lib/puzzle/error.rb', line 3 def code @code end |
#http_status_code ⇒ Object
Returns the value of attribute http_status_code.
3 4 5 |
# File 'lib/puzzle/error.rb', line 3 def http_status_code @http_status_code end |
#message ⇒ Object
Returns the value of attribute message.
3 4 5 |
# File 'lib/puzzle/error.rb', line 3 def @message end |
#stack_trace ⇒ Object
Returns the value of attribute stack_trace.
3 4 5 |
# File 'lib/puzzle/error.rb', line 3 def stack_trace @stack_trace end |