Class: VirtualBox::Platform

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

Class Method Summary collapse

Class Method Details

.jruby?Boolean



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

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

.linux?Boolean



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

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

.mac?Boolean



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

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

.platformObject



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

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

.solaris?Boolean



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

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

.windows?Boolean



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

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