Class: Puzzle::Error

Inherits:
Object
  • Object
show all
Defined in:
lib/puzzle/error.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#codeObject

Returns the value of attribute code.



3
4
5
# File 'lib/puzzle/error.rb', line 3

def code
  @code
end

#http_status_codeObject

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

#messageObject

Returns the value of attribute message.



3
4
5
# File 'lib/puzzle/error.rb', line 3

def message
  @message
end

#stack_traceObject

Returns the value of attribute stack_trace.



3
4
5
# File 'lib/puzzle/error.rb', line 3

def stack_trace
  @stack_trace
end