Module: OS

Defined in:
lib/roku_builder/os.rb

Overview

********** Copyright 2016 Viacom, Inc. Apache 2.0 **********

Class Method Summary collapse

Class Method Details

.jruby?Boolean

Returns:

  • (Boolean)


20
21
22
# File 'lib/roku_builder/os.rb', line 20

def OS.jruby?
  RUBY_ENGINE == 'jruby'
end

.linux?Boolean

Returns:

  • (Boolean)


16
17
18
# File 'lib/roku_builder/os.rb', line 16

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

.mac?Boolean

Returns:

  • (Boolean)


8
9
10
# File 'lib/roku_builder/os.rb', line 8

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

.unix?Boolean

Returns:

  • (Boolean)


12
13
14
# File 'lib/roku_builder/os.rb', line 12

def OS.unix?
  !OS.windows?
end

.windows?Boolean

Returns:

  • (Boolean)


4
5
6
# File 'lib/roku_builder/os.rb', line 4

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