Class: CtdDocumentation::AuthAuthenticate401ErrorException
- Inherits:
-
APIException
- Object
- CoreLibrary::ApiException
- APIException
- CtdDocumentation::AuthAuthenticate401ErrorException
- Defined in:
- lib/ctd_documentation/exceptions/auth_authenticate401_error_exception.rb
Overview
Auth Authenticate 401 Error class.
Instance Attribute Summary collapse
-
#error ⇒ String
TODO: Write general description for this method.
-
#exception ⇒ String
TODO: Write general description for this method.
-
#exception_class ⇒ String
TODO: Write general description for this method.
-
#success ⇒ TrueClass|FalseClass
TODO: Write general description for this method.
Instance Method Summary collapse
-
#initialize(reason, response) ⇒ AuthAuthenticate401ErrorException
constructor
The constructor.
-
#unbox(hash) ⇒ Object
Populates this object by extracting properties from a hash.
Constructor Details
#initialize(reason, response) ⇒ AuthAuthenticate401ErrorException
The constructor.
31 32 33 34 35 |
# File 'lib/ctd_documentation/exceptions/auth_authenticate401_error_exception.rb', line 31 def initialize(reason, response) super(reason, response) hash = APIHelper.json_deserialize(@response.raw_body) unbox(hash) end |
Instance Attribute Details
#error ⇒ String
TODO: Write general description for this method
14 15 16 |
# File 'lib/ctd_documentation/exceptions/auth_authenticate401_error_exception.rb', line 14 def error @error end |
#exception ⇒ String
TODO: Write general description for this method
18 19 20 |
# File 'lib/ctd_documentation/exceptions/auth_authenticate401_error_exception.rb', line 18 def exception @exception end |
#exception_class ⇒ String
TODO: Write general description for this method
22 23 24 |
# File 'lib/ctd_documentation/exceptions/auth_authenticate401_error_exception.rb', line 22 def exception_class @exception_class end |
#success ⇒ TrueClass|FalseClass
TODO: Write general description for this method
26 27 28 |
# File 'lib/ctd_documentation/exceptions/auth_authenticate401_error_exception.rb', line 26 def success @success end |
Instance Method Details
#unbox(hash) ⇒ Object
Populates this object by extracting properties from a hash. response body.
40 41 42 43 44 45 46 |
# File 'lib/ctd_documentation/exceptions/auth_authenticate401_error_exception.rb', line 40 def unbox(hash) @error = hash.key?('error') ? hash['error'] : SKIP @exception = hash.key?('exception') ? hash['exception'] : SKIP @exception_class = hash.key?('exception_class') ? hash['exception_class'] : SKIP @success = hash.key?('success') ? hash['success'] : SKIP end |