Class: Alula::Oauth::Response
- Inherits:
 - 
      Object
      
        
- Object
 - Alula::Oauth::Response
 
 
- Defined in:
 - lib/alula/oauth.rb
 
Overview
Simple Oauth::Response reader object
Instance Attribute Summary collapse
- 
  
    
      #access_token  ⇒ Object 
    
    
  
  
  
  
    
      readonly
    
    
  
  
  
  
  
  
    
Returns the value of attribute access_token.
 - 
  
    
      #expires_at  ⇒ Object 
    
    
  
  
  
  
    
      readonly
    
    
  
  
  
  
  
  
    
Returns the value of attribute expires_at.
 - 
  
    
      #expires_in  ⇒ Object 
    
    
  
  
  
  
    
      readonly
    
    
  
  
  
  
  
  
    
Returns the value of attribute expires_in.
 - 
  
    
      #refresh_token  ⇒ Object 
    
    
  
  
  
  
    
      readonly
    
    
  
  
  
  
  
  
    
Returns the value of attribute refresh_token.
 - 
  
    
      #scope  ⇒ Object 
    
    
  
  
  
  
    
      readonly
    
    
  
  
  
  
  
  
    
Returns the value of attribute scope.
 - 
  
    
      #token_type  ⇒ Object 
    
    
  
  
  
  
    
      readonly
    
    
  
  
  
  
  
  
    
Returns the value of attribute token_type.
 
Instance Method Summary collapse
- 
  
    
      #initialize(attributes)  ⇒ Response 
    
    
  
  
  
    constructor
  
  
  
  
  
  
  
    
A new instance of Response.
 
Constructor Details
#initialize(attributes) ⇒ Response
Returns a new instance of Response.
      94 95 96 97 98 99 100 101 102 103  | 
    
      # File 'lib/alula/oauth.rb', line 94 def initialize(attributes) @raw_response = attributes @token_type = attributes['token_type'] @access_token = attributes['access_token'] @expires_in = attributes['expires_in'] @expires_at = Time.now + @expires_in @refresh_token = attributes['refresh_token'] @scope = attributes['scope'] end  | 
  
Instance Attribute Details
#access_token ⇒ Object (readonly)
Returns the value of attribute access_token.
      92 93 94  | 
    
      # File 'lib/alula/oauth.rb', line 92 def access_token @access_token end  | 
  
#expires_at ⇒ Object (readonly)
Returns the value of attribute expires_at.
      92 93 94  | 
    
      # File 'lib/alula/oauth.rb', line 92 def expires_at @expires_at end  | 
  
#expires_in ⇒ Object (readonly)
Returns the value of attribute expires_in.
      92 93 94  | 
    
      # File 'lib/alula/oauth.rb', line 92 def expires_in @expires_in end  | 
  
#refresh_token ⇒ Object (readonly)
Returns the value of attribute refresh_token.
      92 93 94  | 
    
      # File 'lib/alula/oauth.rb', line 92 def refresh_token @refresh_token end  | 
  
#scope ⇒ Object (readonly)
Returns the value of attribute scope.
      92 93 94  | 
    
      # File 'lib/alula/oauth.rb', line 92 def scope @scope end  | 
  
#token_type ⇒ Object (readonly)
Returns the value of attribute token_type.
      92 93 94  | 
    
      # File 'lib/alula/oauth.rb', line 92 def token_type @token_type end  |