Exception: GetAccept::GetAcceptError

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

Direct Known Subclasses

RequestError, ServerError

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(data = {message: nil, type: nil, response_code: nil, reponse_body: nil, errors: nil}) ⇒ GetAcceptError

Returns a new instance of GetAcceptError.



5
6
7
8
9
10
11
12
13
# File 'lib/get_accept/errors/get_accept_error.rb', line 5

def initialize(data = {message: nil, type: nil, response_code: nil, reponse_body: nil, errors: nil})
  @response_code = data[:response_code]
  @response_body = data[:response_body]
  @message = data[:message]
  @type = data[:type]
  @errors = data[:errors]

  super(message)
end

Instance Attribute Details

#errorsObject

Returns the value of attribute errors.



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

def errors
  @errors
end

#messageObject

Returns the value of attribute message.



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

def message
  @message
end

#response_bodyObject

Returns the value of attribute response_body.



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

def response_body
  @response_body
end

#response_codeObject

Returns the value of attribute response_code.



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

def response_code
  @response_code
end

#typeObject

Returns the value of attribute type.



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

def type
  @type
end