Class: Spotify::Models::Full::Artist
- Defined in:
- lib/spotify/models/full/artist.rb
Instance Attribute Summary collapse
-
#followers ⇒ Object
readonly
Returns the value of attribute followers.
-
#genres ⇒ Object
readonly
Returns the value of attribute genres.
-
#images ⇒ Object
readonly
Returns the value of attribute images.
-
#popularity ⇒ Object
readonly
Returns the value of attribute popularity.
Attributes inherited from Artist
#external_urls, #href, #id, #name, #type, #uri
Instance Method Summary collapse
-
#initialize(args = {}) ⇒ Full::Artist
constructor
Sets the arguments to its variables.
Constructor Details
#initialize(args = {}) ⇒ Full::Artist
Sets the arguments to its variables.
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 |
# File 'lib/spotify/models/full/artist.rb', line 16 def initialize(args = {}) super(args) args = Hash(args).with_indifferent_access # Arrays images = Array(args[:images]).map { |i| Spotify::Models::Image.new(i) } # Objects follower = Spotify::Models::Follower.new(args[:followers]) @followers = follower @genres = args[:genres] @images = images @popularity = args[:popularity] end |
Instance Attribute Details
#followers ⇒ Object (readonly)
Returns the value of attribute followers.
7 8 9 |
# File 'lib/spotify/models/full/artist.rb', line 7 def followers @followers end |
#genres ⇒ Object (readonly)
Returns the value of attribute genres.
7 8 9 |
# File 'lib/spotify/models/full/artist.rb', line 7 def genres @genres end |
#images ⇒ Object (readonly)
Returns the value of attribute images.
7 8 9 |
# File 'lib/spotify/models/full/artist.rb', line 7 def images @images end |
#popularity ⇒ Object (readonly)
Returns the value of attribute popularity.
7 8 9 |
# File 'lib/spotify/models/full/artist.rb', line 7 def popularity @popularity end |