Class: Services::Responses::Error
- Defined in:
- lib/services/responses/error.rb
Instance Attribute Summary collapse
-
#error_code ⇒ Object
Returns the value of attribute error_code.
-
#error_message ⇒ Object
Returns the value of attribute error_message.
Attributes inherited from Base
Instance Method Summary collapse
-
#initialize(result, error_message: nil, error_code: nil) ⇒ Error
constructor
A new instance of Error.
- #success? ⇒ Boolean
Methods inherited from Base
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_code end |
Instance Attribute Details
#error_code ⇒ Object
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_message ⇒ Object
Returns the value of attribute error_message.
4 5 6 |
# File 'lib/services/responses/error.rb', line 4 def @error_message end |
Instance Method Details
#success? ⇒ Boolean
10 11 12 |
# File 'lib/services/responses/error.rb', line 10 def success? false end |