Class: ItunesController::ITunesControllerFactory

Inherits:
Object
  • Object
show all
Defined in:
lib/itunesController/itunescontroller_factory.rb

Overview

This is a factory class used to create a iTunes controller for the current platform

Class Method Summary collapse

Class Method Details

.createControllerItunesController::BaseITunesController

Used to create the iTunes controller for different platforms

Returns:

Raises:

  • If the platform is unsupported



41
42
43
44
45
46
47
48
49
# File 'lib/itunesController/itunescontroller_factory.rb', line 41

def self.createController()
    if ItunesController::Platform::isWindows()
      return ItunesController::WindowsITunesController.new()
    elsif ItunesController::Platform::isMacOSX()
      return ItunesController::MacOSXITunesController.new()
    else
      raise("Unsupported operating system #{RUBY_PLATFORM}.")
    end            
end