Module: OS

Defined in:
lib/fir/patches/os_patch.rb

Class Method Summary collapse

Class Method Details

.linux?Boolean

Returns:

  • (Boolean)


18
19
20
# File 'lib/fir/patches/os_patch.rb', line 18

def linux?
  OS.unix? && !OS.mac?
end

.mac?Boolean

Returns:

  • (Boolean)


10
11
12
# File 'lib/fir/patches/os_patch.rb', line 10

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

.unix?Boolean

Returns:

  • (Boolean)


14
15
16
# File 'lib/fir/patches/os_patch.rb', line 14

def unix?
  !OS.windows?
end

.windows?Boolean

Returns:

  • (Boolean)


6
7
8
# File 'lib/fir/patches/os_patch.rb', line 6

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