Module: OS
- Defined in:
- lib/nucleus/os.rb
Overview
Operating System module to detect the current platform From: stackoverflow.com/questions/170956/how-can-i-find-which-operating-system-my-ruby-program-is-running-on
Class Method Summary collapse
-
.unix? ⇒ Boolean
Is the current platform Unix?.
-
.windows? ⇒ Boolean
Is the current platform windows?.
Class Method Details
.unix? ⇒ Boolean
Is the current platform Unix?
12 13 14 |
# File 'lib/nucleus/os.rb', line 12 def self.unix? !OS.windows? end |
.windows? ⇒ Boolean
Is the current platform windows?
6 7 8 |
# File 'lib/nucleus/os.rb', line 6 def self.windows? (/cygwin|mswin|mingw|bccwin|wince|emx/ =~ RUBY_PLATFORM) != nil end |