Module: OS

Defined in:
lib/nucleus/os.rb

Overview

Class Method Summary collapse

Class Method Details

.unix?Boolean

Is the current platform Unix?

Returns:

  • (Boolean)

    true if on Unix, else false



12
13
14
# File 'lib/nucleus/os.rb', line 12

def self.unix?
  !OS.windows?
end

.windows?Boolean

Is the current platform windows?

Returns:

  • (Boolean)

    true if on windows, else false



6
7
8
# File 'lib/nucleus/os.rb', line 6

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