module OS
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
Public Class Methods
unix?()
click to toggle source
Is the current platform Unix? @return [Boolean] true if on Unix, else false
# File lib/nucleus/os.rb, line 12 def self.unix? !OS.windows? end
windows?()
click to toggle source
Is the current platform windows? @return [Boolean] true if on windows, else false
# File lib/nucleus/os.rb, line 6 def self.windows? (/cygwin|mswin|mingw|bccwin|wince|emx/ =~ RUBY_PLATFORM) != nil end