Skip to content

Instantly share code, notes, and snippets.

@adamjonas
Created July 9, 2012 17:45
Show Gist options
  • Save adamjonas/3077842 to your computer and use it in GitHub Desktop.
Save adamjonas/3077842 to your computer and use it in GitHub Desktop.
Missing Pieces of Blane's Final
class Artist
def genres
@songs.collect{|s| s.genre}
end
end
class Song
attr_accessor :name, :song, :artist, :genre
def genre=(genre)
@genre = genre
@genre.songs << self
end
end
class Genre
def artists
@songs.collect{|s| s.artist}.uniq
end
@BlaneCordes
Copy link

hmmmmmmmmmm

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment