Module: RadianceMeasure::OS

Defined in:
lib/measures/radiance_measure/measure.rb

Overview

better OS detection will call out Git Bash shells as Windows machines, optionally differentiates Mac versus *nix

Class Method Summary collapse

Class Method Details

.linuxObject



234
235
236
# File 'lib/measures/radiance_measure/measure.rb', line 234

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

.macObject



226
227
228
# File 'lib/measures/radiance_measure/measure.rb', line 226

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

.unixObject



230
231
232
# File 'lib/measures/radiance_measure/measure.rb', line 230

def self.unix
  !OS.windows
end

.windowsObject



222
223
224
# File 'lib/measures/radiance_measure/measure.rb', line 222

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