Class: Alula::Oauth::Error
- Inherits:
-
Object
- Object
- Alula::Oauth::Error
- Defined in:
- lib/alula/oauth.rb
Overview
Simple representation of an auth error
Instance Attribute Summary collapse
-
#code ⇒ Object
readonly
Returns the value of attribute code.
-
#error ⇒ Object
readonly
Returns the value of attribute error.
-
#error_description ⇒ Object
readonly
Returns the value of attribute error_description.
-
#raw_response ⇒ Object
readonly
Returns the value of attribute raw_response.
Instance Method Summary collapse
-
#initialize(attributes) ⇒ Error
constructor
A new instance of Error.
Constructor Details
#initialize(attributes) ⇒ Error
Returns a new instance of Error.
110 111 112 113 114 115 |
# File 'lib/alula/oauth.rb', line 110 def initialize(attributes) @raw_response = attributes @code = attributes['code'] @error = attributes['error'] @error_description = attributes['error_description'] || attributes['message'] end |
Instance Attribute Details
#code ⇒ Object (readonly)
Returns the value of attribute code.
108 109 110 |
# File 'lib/alula/oauth.rb', line 108 def code @code end |
#error ⇒ Object (readonly)
Returns the value of attribute error.
108 109 110 |
# File 'lib/alula/oauth.rb', line 108 def error @error end |
#error_description ⇒ Object (readonly)
Returns the value of attribute error_description.
108 109 110 |
# File 'lib/alula/oauth.rb', line 108 def error_description @error_description end |
#raw_response ⇒ Object (readonly)
Returns the value of attribute raw_response.
108 109 110 |
# File 'lib/alula/oauth.rb', line 108 def raw_response @raw_response end |