Sha256: 4f2d2d581b492ba96d69655c9b690fa6a17a57a5c72638711a3a690f716db6db
Contents?: true
Size: 513 Bytes
Versions: 3
Compression:
Stored size: 513 Bytes
Contents
# Operating System module to detect the current platform # From: http://stackoverflow.com/questions/170956/how-can-i-find-which-operating-system-my-ruby-program-is-running-on module OS # Is the current platform windows? # @return [Boolean] true if on windows, else false def self.windows? (/cygwin|mswin|mingw|bccwin|wince|emx/ =~ RUBY_PLATFORM) != nil end # Is the current platform Unix? # @return [Boolean] true if on Unix, else false def self.unix? !OS.windows? end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
nucleus-0.3.1 | lib/nucleus/os.rb |
nucleus-0.2.0 | lib/nucleus/os.rb |
nucleus-0.1.0 | lib/nucleus/os.rb |