Module: OSZILLA

Included in:
GetZilla
Defined in:
lib/osZilla.rb

Overview

This module allow to define the current operating system.

Instance Method Summary collapse

Instance Method Details

#linux?Boolean

Detection of Linux.


27
28
29
# File 'lib/osZilla.rb', line 27

def linux?
  unix? && !mac?
end

#mac?Boolean

Detection of Macintosh.


15
16
17
# File 'lib/osZilla.rb', line 15

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

#unix?Boolean

Detection of Unix.


21
22
23
# File 'lib/osZilla.rb', line 21

def unix?
  !windows?
end

#windows?Boolean

Detection of Windows.


9
10
11
# File 'lib/osZilla.rb', line 9

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