Class: ItunesController::Platform
- Inherits:
-
Object
- Object
- ItunesController::Platform
- Defined in:
- lib/itunesController/platform.rb
Class Method Summary collapse
Class Method Details
.getUserHomeDir ⇒ Object
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 |
.isJRuby ⇒ Object
48 49 50 |
# File 'lib/itunesController/platform.rb', line 48 def self.isJRuby() return RUBY_PLATFORM =~ /java/ end |
.isLinux ⇒ Object
44 45 46 |
# File 'lib/itunesController/platform.rb', line 44 def self.isLinux() return RUBY_PLATFORM =~ /linux/ end |
.isMacOSX ⇒ Object
40 41 42 |
# File 'lib/itunesController/platform.rb', line 40 def self.isMacOSX() return RUBY_PLATFORM =~ /darwin/ end |
.isWindows ⇒ Object
36 37 38 |
# File 'lib/itunesController/platform.rb', line 36 def self.isWindows() return RUBY_PLATFORM =~ /mswin|mingw/ end |