Exception: PostProxy::Error

Inherits:
StandardError
  • Object
show all
Defined in:
lib/postproxy/errors.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(message, status_code: nil, response: nil) ⇒ Error

Returns a new instance of Error.



5
6
7
8
9
# File 'lib/postproxy/errors.rb', line 5

def initialize(message, status_code: nil, response: nil)
  super(message)
  @status_code = status_code
  @response = response
end

Instance Attribute Details

#responseObject (readonly)

Returns the value of attribute response.



3
4
5
# File 'lib/postproxy/errors.rb', line 3

def response
  @response
end

#status_codeObject (readonly)

Returns the value of attribute status_code.



3
4
5
# File 'lib/postproxy/errors.rb', line 3

def status_code
  @status_code
end