Module: Sesh::Inferences::OS

Defined in:
lib/sesh/inferences.rb

Class Method Summary collapse

Class Method Details

.linux?Boolean

Returns:

  • (Boolean)


48
# File 'lib/sesh/inferences.rb', line 48

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

.mac?Boolean

Returns:

  • (Boolean)


46
# File 'lib/sesh/inferences.rb', line 46

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

.unix?Boolean

Returns:

  • (Boolean)


47
# File 'lib/sesh/inferences.rb', line 47

def OS.unix?; !OS.windows? end

.windows?Boolean

Returns:

  • (Boolean)


44
45
# File 'lib/sesh/inferences.rb', line 44

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