From 717b2d1fb3c7d0e7d8457928c7bbc9d2ba7ed55c Mon Sep 17 00:00:00 2001 From: Lee Machin Date: Thu, 12 Dec 2013 11:50:12 +0000 Subject: [PATCH] Remove fake association style stuff --- lib/mpd_client/album.rb | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/lib/mpd_client/album.rb b/lib/mpd_client/album.rb index 92d019e..3011339 100644 --- a/lib/mpd_client/album.rb +++ b/lib/mpd_client/album.rb @@ -2,7 +2,6 @@ module MPDClient class Album include ClassToProc - include Enumerable include Jsonable extend Forwardable @@ -10,12 +9,7 @@ module MPDClient delegate %i(artist genre) => :@first_song def initialize(album) - @songs = MPDClient::Song.by(album: album) - @first_song = @songs.first - end - - def each(&block) - @songs.each(&block) + @first_song = MPDClient::Song.by(album: album).first end def title @@ -35,8 +29,7 @@ module MPDClient title: title, artist: artist, genre: genre, - year: year, - songs: self.map(&:to_h) + year: year } end