Class: VirtualBox::Platform

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

Class Method Summary (collapse)

Class Method Details

+ (Boolean) jruby?



22
23
24
# File 'lib/virtualbox/ext/platform.rb', line 22

def jruby?
  RbConfig::CONFIG["ruby_install_name"] == "jruby"
end

+ (Boolean) linux?



14
15
16
# File 'lib/virtualbox/ext/platform.rb', line 14

def linux?
  platform.include?("linux")
end

+ (Boolean) mac?



6
7
8
# File 'lib/virtualbox/ext/platform.rb', line 6

def mac?
  platform.include?("darwin")
end

+ (Object) platform



26
27
28
# File 'lib/virtualbox/ext/platform.rb', line 26

def platform
  RbConfig::CONFIG["host_os"].downcase
end

+ (Boolean) solaris?



18
19
20
# File 'lib/virtualbox/ext/platform.rb', line 18

def solaris?
  platform.include?("solaris")
end

+ (Boolean) windows?



10
11
12
# File 'lib/virtualbox/ext/platform.rb', line 10

def windows?
  platform.include?("mswin") || platform.include?("mingw") || platform.include?("cygwin")
end