1
0
mirror of https://github.com/danbee/mpd-client synced 2025-03-04 08:39:09 +00:00

Remove fake association style stuff

This commit is contained in:
Lee Machin 2013-12-12 11:50:12 +00:00
parent 0bf3a50cb5
commit 717b2d1fb3

View File

@ -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