Class: Services::Responses::Error

Inherits:
Base
  • Object
show all
Defined in:
lib/services/responses/error.rb

Instance Attribute Summary collapse

Attributes inherited from Base

#result

Instance Method Summary collapse

Methods inherited from Base

#error?

Constructor Details

#initialize(result, error_message: nil, error_code: nil) ⇒ Error

Returns a new instance of Error.



6
7
8
# File 'lib/services/responses/error.rb', line 6

def initialize(result, error_message: nil, error_code: nil)
  @result, @error_message, @error_code = result, error_message, error_code
end

Instance Attribute Details

#error_codeObject

Returns the value of attribute error_code.



4
5
6
# File 'lib/services/responses/error.rb', line 4

def error_code
  @error_code
end

#error_messageObject

Returns the value of attribute error_message.



4
5
6
# File 'lib/services/responses/error.rb', line 4

def error_message
  @error_message
end

Instance Method Details

#success?Boolean

Returns:

  • (Boolean)


10
11
12
# File 'lib/services/responses/error.rb', line 10

def success?
  false
end