1
0
mirror of https://github.com/danbee/mpd-client synced 2025-03-04 08:39:09 +00:00
mpd-client/models/song.rb
2013-10-17 11:24:58 +01:00

16 lines
304 B
Ruby

require './models/mpd_connection'
class Song < Struct.new(:artist, :album, :title)
def initialize(song)
@song = song
self.artist = song.artist
self.album = song.album
self.title = song.title
end
def self.queue
MPDConnection.mpd.queue.map { |song| self.new(song) }
end
end