Module: OS

Defined in:
lib/vagrant-easyconfig/os.rb

Overview

-*- mode: ruby -*- vi: set ft=ruby :

Class Method Summary collapse

Class Method Details

.linux?Boolean

Returns:

  • (Boolean)


17
18
19
# File 'lib/vagrant-easyconfig/os.rb', line 17

def OS.linux?
  OS.unix? and not OS.mac?
end

.mac?Boolean

Returns:

  • (Boolean)


9
10
11
# File 'lib/vagrant-easyconfig/os.rb', line 9

def OS.mac?
  (/darwin/ =~ RUBY_PLATFORM) != nil
end

.unix?Boolean

Returns:

  • (Boolean)


13
14
15
# File 'lib/vagrant-easyconfig/os.rb', line 13

def OS.unix?
  !OS.windows?
end

.windows?Boolean

Returns:

  • (Boolean)


5
6
7
# File 'lib/vagrant-easyconfig/os.rb', line 5

def OS.windows?
  (/cygwin|mswin|mingw|bccwin|wince|emx/ =~ RUBY_PLATFORM) != nil
end