Class: Spotify::SDK::Initialization::OAuthAccessToken
- Defined in:
- lib/spotify/sdk/initialization/oauth_access_token.rb
Overview
This class implements accepting OAuth2::AccessToken as an initializer.
Instance Attribute Summary
Attributes inherited from Base
Instance Method Summary collapse
-
#perform ⇒ Object
This implements the #perform method from the Base class.
-
#should_perform? ⇒ Boolean
This implements the #should_perform? method from the Base class.
Methods inherited from Base
Constructor Details
This class inherits a constructor from Spotify::SDK::Initialization::Base
Instance Method Details
#perform ⇒ Object
This implements the #perform method from the Base class.
24 25 26 27 28 29 30 |
# File 'lib/spotify/sdk/initialization/oauth_access_token.rb', line 24 def perform { access_token: subject.token, expires_in: subject.expires_in, refresh_token: subject.refresh_token } end |
#should_perform? ⇒ Boolean
This implements the #should_perform? method from the Base class.
15 16 17 |
# File 'lib/spotify/sdk/initialization/oauth_access_token.rb', line 15 def should_perform? subject.instance_of? OAuth2::AccessToken end |