Class: Avmtrf1::Tools::Msgraph::Error
- Inherits:
-
EacRest::Error
- Object
- EacRest::Error
- Avmtrf1::Tools::Msgraph::Error
- Defined in:
- lib/avmtrf1/tools/msgraph/error.rb
Constant Summary collapse
- INVALID_TOKEN_CODE =
'InvalidAuthenticationToken'
Instance Attribute Summary collapse
-
#data ⇒ Object
readonly
Returns the value of attribute data.
Instance Method Summary collapse
- #code ⇒ String
-
#initialize(data) ⇒ Error
constructor
A new instance of Error.
- #invalid_token? ⇒ Boolean
Constructor Details
#initialize(data) ⇒ Error
Returns a new instance of Error.
14 15 16 17 |
# File 'lib/avmtrf1/tools/msgraph/error.rb', line 14 def initialize(data) @data = data super(data.pretty_inspect) end |
Instance Attribute Details
#data ⇒ Object (readonly)
Returns the value of attribute data.
12 13 14 |
# File 'lib/avmtrf1/tools/msgraph/error.rb', line 12 def data @data end |
Instance Method Details
#code ⇒ String
20 21 22 |
# File 'lib/avmtrf1/tools/msgraph/error.rb', line 20 def code data.fetch('code') end |
#invalid_token? ⇒ Boolean
25 26 27 |
# File 'lib/avmtrf1/tools/msgraph/error.rb', line 25 def invalid_token? code == INVALID_TOKEN_CODE end |