Module: Application::OS

Defined in:
lib/cantemo/portal/agent/cli/commands/watch_folders.rb

Class Method Summary collapse

Class Method Details

.linux?Boolean

Returns:

  • (Boolean)


90
# File 'lib/cantemo/portal/agent/cli/commands/watch_folders.rb', line 90

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

.mac?Boolean

Returns:

  • (Boolean)


88
# File 'lib/cantemo/portal/agent/cli/commands/watch_folders.rb', line 88

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

.unix?Boolean

Returns:

  • (Boolean)


89
# File 'lib/cantemo/portal/agent/cli/commands/watch_folders.rb', line 89

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

.windows?Boolean

Returns:

  • (Boolean)


87
# File 'lib/cantemo/portal/agent/cli/commands/watch_folders.rb', line 87

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