Class: PF::OAuth2Account

Inherits:
Object
  • Object
show all
Defined in:
lib/pf/profile/profile.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(name, client_id, client_secret, access_token: nil, refresh_token: nil) ⇒ OAuth2Account

Returns a new instance of OAuth2Account.



154
155
156
157
158
159
160
# File 'lib/pf/profile/profile.rb', line 154

def initialize(name, client_id, client_secret, access_token: nil, refresh_token: nil)
  @name = name
  @client_id = client_id
  @client_secret = client_secret
  @access_token = access_token
  @refresh_token = refresh_token
end

Instance Attribute Details

#access_tokenObject

Returns the value of attribute access_token.



152
153
154
# File 'lib/pf/profile/profile.rb', line 152

def access_token
  @access_token
end

#client_idObject

Returns the value of attribute client_id.



152
153
154
# File 'lib/pf/profile/profile.rb', line 152

def client_id
  @client_id
end

#client_secretObject

Returns the value of attribute client_secret.



152
153
154
# File 'lib/pf/profile/profile.rb', line 152

def client_secret
  @client_secret
end

#nameObject

Returns the value of attribute name.



152
153
154
# File 'lib/pf/profile/profile.rb', line 152

def name
  @name
end

#refresh_tokenObject

Returns the value of attribute refresh_token.



152
153
154
# File 'lib/pf/profile/profile.rb', line 152

def refresh_token
  @refresh_token
end

Instance Method Details

#equal?(other) ⇒ Boolean

Returns:

  • (Boolean)


162
163
164
# File 'lib/pf/profile/profile.rb', line 162

def equal?(other)
  @name == other.name and @client_id = other.client_id and @client_secret = other.client_secret
end