Module: OS

Included in:
Arcadia
Defined in:
lib/a-commons.rb

Class Method Summary collapse

Class Method Details

.arm?Boolean

Returns:

  • (Boolean)


1396
1397
1398
# File 'lib/a-commons.rb', line 1396

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

.freebsd?Boolean

Returns:

  • (Boolean)


1392
1393
1394
# File 'lib/a-commons.rb', line 1392

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

.linux?Boolean

Returns:

  • (Boolean)


1388
1389
1390
# File 'lib/a-commons.rb', line 1388

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

.mac?Boolean

Returns:

  • (Boolean)


1380
1381
1382
# File 'lib/a-commons.rb', line 1380

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

.unix?Boolean

Returns:

  • (Boolean)


1384
1385
1386
# File 'lib/a-commons.rb', line 1384

def OS.unix?
  !OS.windows?
end

.windows?Boolean

Returns:

  • (Boolean)


1376
1377
1378
# File 'lib/a-commons.rb', line 1376

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