Class: DocFox::AccessToken::Facade

Inherits:
Object
  • Object
show all
Defined in:
lib/doc_fox/access_token/facade.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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_atObject (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

#tokenObject (readonly)

Returns the value of attribute token.



4
5
6
# File 'lib/doc_fox/access_token/facade.rb', line 4

def token
  @token
end