Class: Spotify::Models::Album
- Inherits:
-
Object
- Object
- Spotify::Models::Album
- Defined in:
- lib/spotify/models/album.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#album_type ⇒ Object
readonly
Returns the value of attribute album_type.
-
#available_markets ⇒ Object
readonly
Returns the value of attribute available_markets.
-
#external_urls ⇒ Object
readonly
Returns the value of attribute external_urls.
-
#genres ⇒ Object
readonly
Returns the value of attribute genres.
-
#href ⇒ Object
readonly
Returns the value of attribute href.
-
#id ⇒ Object
readonly
Returns the value of attribute id.
-
#images ⇒ Object
readonly
Returns the value of attribute images.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#type ⇒ Object
readonly
Returns the value of attribute type.
-
#uri ⇒ Object
readonly
Returns the value of attribute uri.
Instance Method Summary collapse
-
#initialize(args = {}) ⇒ Album
constructor
Sets the arguments to its variables.
Constructor Details
#initialize(args = {}) ⇒ Album
Sets the arguments to its variables.
17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 |
# File 'lib/spotify/models/album.rb', line 17 def initialize(args = {}) args = Hash(args).with_indifferent_access # Arrays images = Array(args[:images]).map { |i| Spotify::Models::Image.new(i) } # Objects external_urls = Spotify::Models::ExternalURL.new(args[:external_urls]) @album_type = args[:album_type] @available_markets = args[:available_markets] @external_urls = external_urls @genres = args[:genres] @href = args[:href] @id = args[:id] @images = images @name = args[:name] @type = args[:type] @uri = args[:uri] end |
Instance Attribute Details
#album_type ⇒ Object (readonly)
Returns the value of attribute album_type.
7 8 9 |
# File 'lib/spotify/models/album.rb', line 7 def album_type @album_type end |
#available_markets ⇒ Object (readonly)
Returns the value of attribute available_markets.
7 8 9 |
# File 'lib/spotify/models/album.rb', line 7 def available_markets @available_markets end |
#external_urls ⇒ Object (readonly)
Returns the value of attribute external_urls.
7 8 9 |
# File 'lib/spotify/models/album.rb', line 7 def external_urls @external_urls end |
#genres ⇒ Object (readonly)
Returns the value of attribute genres.
7 8 9 |
# File 'lib/spotify/models/album.rb', line 7 def genres @genres end |
#href ⇒ Object (readonly)
Returns the value of attribute href.
7 8 9 |
# File 'lib/spotify/models/album.rb', line 7 def href @href end |
#id ⇒ Object (readonly)
Returns the value of attribute id.
7 8 9 |
# File 'lib/spotify/models/album.rb', line 7 def id @id end |
#images ⇒ Object (readonly)
Returns the value of attribute images.
7 8 9 |
# File 'lib/spotify/models/album.rb', line 7 def images @images end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
7 8 9 |
# File 'lib/spotify/models/album.rb', line 7 def name @name end |
#type ⇒ Object (readonly)
Returns the value of attribute type.
7 8 9 |
# File 'lib/spotify/models/album.rb', line 7 def type @type end |
#uri ⇒ Object (readonly)
Returns the value of attribute uri.
7 8 9 |
# File 'lib/spotify/models/album.rb', line 7 def uri @uri end |