Class: ItunesController::Platform

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

Class Method Summary collapse

Class Method Details

.getUserHomeDirObject



26
27
28
29
30
31
32
33
34
# File 'lib/itunesController/platform.rb', line 26

def self.getUserHomeDir()
    homes = ["HOME", "HOMEPATH"]
    realHome = homes.detect {|h| ENV[h] != nil}
    if not realHome
        raise "Could not find home directory"
    end
    
    return ENV[realHome]
end

.isJRubyObject



48
49
50
# File 'lib/itunesController/platform.rb', line 48

def self.isJRuby()
    return RUBY_PLATFORM =~ /java/
end

.isLinuxObject



44
45
46
# File 'lib/itunesController/platform.rb', line 44

def self.isLinux()
    return RUBY_PLATFORM =~ /linux/
end

.isMacOSXObject



40
41
42
# File 'lib/itunesController/platform.rb', line 40

def self.isMacOSX()
    return RUBY_PLATFORM =~ /darwin/
end

.isWindowsObject



36
37
38
# File 'lib/itunesController/platform.rb', line 36

def self.isWindows()
    return RUBY_PLATFORM =~ /mswin|mingw/
end