Module: OS

Defined in:
lib/STLExtract.rb

Class Method Summary collapse

Class Method Details

.linux?Boolean

Returns:

  • (Boolean)


175
176
177
# File 'lib/STLExtract.rb', line 175

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

.mac?Boolean

Returns:

  • (Boolean)


167
168
169
# File 'lib/STLExtract.rb', line 167

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

.unix?Boolean

Returns:

  • (Boolean)


171
172
173
# File 'lib/STLExtract.rb', line 171

def OS.unix?
  !OS.windows?
end

.windows?Boolean

Returns:

  • (Boolean)


163
164
165
# File 'lib/STLExtract.rb', line 163

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