Module: OS

Defined in:
ext/mkrf_conf.rb

Class Method Summary collapse

Class Method Details

.linux?Boolean

Returns:

  • (Boolean)


21
22
23
# File 'ext/mkrf_conf.rb', line 21

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

.mac?Boolean

Returns:

  • (Boolean)


13
14
15
# File 'ext/mkrf_conf.rb', line 13

def OS.mac?
 (/darwin/ =~ RbConfig::CONFIG['host_os']) != nil
end

.unix?Boolean

Returns:

  • (Boolean)


17
18
19
# File 'ext/mkrf_conf.rb', line 17

def OS.unix?
  !OS.windows?
end

.windows?Boolean

Returns:

  • (Boolean)


9
10
11
# File 'ext/mkrf_conf.rb', line 9

def OS.windows?
  (/cygwin|mswin|mingw|bccwin|wince|emx/ =~ RbConfig::CONFIG['host_os']) != nil
end