Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class Artist
- attr_accessor :name,
- :country,
- :genre,
- :albumList
- def initialize(bool)
- @albumList = []
- if bool.instance_of? Song
- @name = bool.artist
- @country = bool.country
- @genre = bool.genre
- else
- @name = "Various Artists"
- @country = "Various"
- @genre = "Various"
- end
- end
- def to_s
- self.inspect
- end
- def ==(an_artist)
- @name == an_artist.name &&
- @country == an_artist.country &&
- @genre = an_artist.genre
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement