Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class Album
- attr_accessor :compilation,
- :title,
- :year,
- :title,
- :track_count,
- :total_time,
- :trackList,
- :coverList
- def initialize(song)
- if song.instance_of? Song
- @compilation = song.tags[:compilation]
- @title = song.album
- @year = song.year
- @track_count = song.track_count
- end
- @trackList = []
- @coverList = []
- end
- def to_s
- self.inspect
- end
- def ==(an_album)
- @compilation == an_album.compilation &&
- @title == an_album.title &&
- @year = an_album.year &&
- @track_count = an_album.track_count
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement