Class: DocFox::AccessToken::Facade
- Inherits:
-
Object
- Object
- DocFox::AccessToken::Facade
- Defined in:
- lib/doc_fox/access_token/facade.rb
Instance Attribute Summary collapse
-
#expires_at ⇒ Object
readonly
Returns the value of attribute expires_at.
-
#token ⇒ Object
readonly
Returns the value of attribute token.
Instance Method Summary collapse
-
#initialize(hash) ⇒ Facade
constructor
A new instance of Facade.
Constructor Details
#initialize(hash) ⇒ Facade
Returns a new instance of Facade.
6 7 8 9 10 11 |
# File 'lib/doc_fox/access_token/facade.rb', line 6 def initialize(hash) attributes = hash.dig('data', 'attributes') @token = attributes['token'] @expires_at = attributes['expires_at'] end |
Instance Attribute Details
#expires_at ⇒ Object (readonly)
Returns the value of attribute expires_at.
4 5 6 |
# File 'lib/doc_fox/access_token/facade.rb', line 4 def expires_at @expires_at end |
#token ⇒ Object (readonly)
Returns the value of attribute token.
4 5 6 |
# File 'lib/doc_fox/access_token/facade.rb', line 4 def token @token end |