Files
SpotMenu/MusicPlayer/Manager/MusicPlayerFactory.swift
2017-12-09 20:55:56 +01:00

25 lines
428 B
Swift
Executable File

//
// MusicPlayerFactory.swift
// MusicPlayer
//
// Created by Michael Row on 2017/9/3.
//
import Foundation
class MusicPlayerFactory {
static func musicPlayer(name: MusicPlayerName) -> MusicPlayer? {
switch name {
case .iTunes:
return iTunes()
case .spotify:
return Spotify()
case .vox:
return Vox()
}
}
private init() {}
}