Class: SpotifyExporter::AppConfig
- Inherits:
-
Object
- Object
- SpotifyExporter::AppConfig
- Defined in:
- lib/spotifyexporter/config.rb
Instance Attribute Summary collapse
-
#spotify_client_id ⇒ Object
Returns the value of attribute spotify_client_id.
-
#spotify_client_secret ⇒ Object
Returns the value of attribute spotify_client_secret.
Class Method Summary collapse
Instance Method Summary collapse
- #credentials? ⇒ Boolean
-
#initialize(id, secret) ⇒ AppConfig
constructor
A new instance of AppConfig.
- #to_yaml ⇒ Object
Constructor Details
#initialize(id, secret) ⇒ AppConfig
Returns a new instance of AppConfig.
19 20 21 22 |
# File 'lib/spotifyexporter/config.rb', line 19 def initialize(id, secret) @spotify_client_id = id @spotify_client_secret = secret end |
Instance Attribute Details
#spotify_client_id ⇒ Object
Returns the value of attribute spotify_client_id.
17 18 19 |
# File 'lib/spotifyexporter/config.rb', line 17 def spotify_client_id @spotify_client_id end |
#spotify_client_secret ⇒ Object
Returns the value of attribute spotify_client_secret.
17 18 19 |
# File 'lib/spotifyexporter/config.rb', line 17 def spotify_client_secret @spotify_client_secret end |
Class Method Details
.new_empty ⇒ Object
32 33 34 |
# File 'lib/spotifyexporter/config.rb', line 32 def self.new_empty new("", "") end |
Instance Method Details
#credentials? ⇒ Boolean
28 29 30 |
# File 'lib/spotifyexporter/config.rb', line 28 def credentials? !@spotify_client_secret.nil? && !@spotify_client_id.nil? end |
#to_yaml ⇒ Object
24 25 26 |
# File 'lib/spotifyexporter/config.rb', line 24 def to_yaml to_h.to_yaml end |