Class: Bandcamp::Album
Instance Attribute Summary collapse
-
#about ⇒ Object
readonly
Returns the value of attribute about.
-
#album_id ⇒ Object
readonly
Returns the value of attribute album_id.
-
#artist ⇒ Object
readonly
Returns the value of attribute artist.
-
#band_id ⇒ Object
readonly
Returns the value of attribute band_id.
-
#credits ⇒ Object
readonly
Returns the value of attribute credits.
-
#downloadable ⇒ Object
readonly
Returns the value of attribute downloadable.
-
#large_art_url ⇒ Object
readonly
Returns the value of attribute large_art_url.
-
#release_date ⇒ Object
readonly
Returns the value of attribute release_date.
-
#small_art_url ⇒ Object
readonly
Returns the value of attribute small_art_url.
-
#title ⇒ Object
readonly
Returns the value of attribute title.
-
#tracks ⇒ Object
readonly
Returns the value of attribute tracks.
-
#url ⇒ Object
readonly
Returns the value of attribute url.
Class Method Summary collapse
Instance Method Summary collapse
- #band ⇒ Object
-
#initialize(album) ⇒ Album
constructor
A new instance of Album.
Methods inherited from Base
Constructor Details
#initialize(album) ⇒ Album
Returns a new instance of Album.
69 70 71 72 73 74 75 76 77 78 79 80 81 82 |
# File 'lib/bandcamp.rb', line 69 def initialize(album) @title = album['title'] @release_date = Time.at(album['release_date']) @downloadable = album['downloadable'] @url = album['url'] @about = album['about'] @credits = album['credits'] @small_art_url = album['small_art_url'] @large_art_url = album['large_art_url'] @artist = album['artist'] @album_id = album['album_id'] @band_id = album['band_id'] @tracks = album['tracks'].map{ |track| Track.new(track) } end |
Instance Attribute Details
#about ⇒ Object (readonly)
Returns the value of attribute about.
66 67 68 |
# File 'lib/bandcamp.rb', line 66 def about @about end |
#album_id ⇒ Object (readonly)
Returns the value of attribute album_id.
66 67 68 |
# File 'lib/bandcamp.rb', line 66 def album_id @album_id end |
#artist ⇒ Object (readonly)
Returns the value of attribute artist.
66 67 68 |
# File 'lib/bandcamp.rb', line 66 def artist @artist end |
#band_id ⇒ Object (readonly)
Returns the value of attribute band_id.
66 67 68 |
# File 'lib/bandcamp.rb', line 66 def band_id @band_id end |
#credits ⇒ Object (readonly)
Returns the value of attribute credits.
66 67 68 |
# File 'lib/bandcamp.rb', line 66 def credits @credits end |
#downloadable ⇒ Object (readonly)
Returns the value of attribute downloadable.
66 67 68 |
# File 'lib/bandcamp.rb', line 66 def downloadable @downloadable end |
#large_art_url ⇒ Object (readonly)
Returns the value of attribute large_art_url.
66 67 68 |
# File 'lib/bandcamp.rb', line 66 def large_art_url @large_art_url end |
#release_date ⇒ Object (readonly)
Returns the value of attribute release_date.
66 67 68 |
# File 'lib/bandcamp.rb', line 66 def release_date @release_date end |
#small_art_url ⇒ Object (readonly)
Returns the value of attribute small_art_url.
66 67 68 |
# File 'lib/bandcamp.rb', line 66 def small_art_url @small_art_url end |
#title ⇒ Object (readonly)
Returns the value of attribute title.
66 67 68 |
# File 'lib/bandcamp.rb', line 66 def title @title end |
#tracks ⇒ Object (readonly)
Returns the value of attribute tracks.
66 67 68 |
# File 'lib/bandcamp.rb', line 66 def tracks @tracks end |
#url ⇒ Object (readonly)
Returns the value of attribute url.
66 67 68 |
# File 'lib/bandcamp.rb', line 66 def url @url end |