Sha256: 1939ff7568e080c3cb457a553e07e69741a0ea2b5683d74607b4bcb22db21993
Contents?: true
Size: 436 Bytes
Versions: 5
Compression:
Stored size: 436 Bytes
Contents
module Mobilis module OS # https://stackoverflow.com/questions/170956/how-can-i-find-which-operating-system-my-ruby-program-is-running-on def OS.windows? (/cygwin|mswin|mingw|bccwin|wince|emx/ =~ RUBY_PLATFORM) != nil end def OS.mac? (/darwin/ =~ RUBY_PLATFORM) != nil end def OS.unix? !OS.windows? end def OS.linux? OS.unix? and not OS.mac? end def OS.jruby? RUBY_ENGINE == 'jruby' end end end
Version data entries
5 entries across 5 versions & 1 rubygems
Version | Path |
---|---|
mobilis-0.0.5 | lib/mobilis/os.rb |
mobilis-0.0.4 | lib/mobilis/os.rb |
mobilis-0.0.3 | lib/mobilis/os.rb |
mobilis-0.0.2 | lib/mobilis/os.rb |
mobilis-0.0.1 | lib/mobilis/os.rb |