Sha256: 3538e36fe8124216350052980257421a37c579e7c6c3ef97e25c388719d92ea9
Contents?: true
Size: 1.32 KB
Versions: 13
Compression:
Stored size: 1.32 KB
Contents
module SifttterRedux # ====================================================== # OS Module # # Module to easily find the running operating system # ====================================================== module OS # ---------------------------------------------------- # linux? method # # Returns true if the host OS is Linux. # @return Bool # ---------------------------------------------------- def OS.linux? self.unix? and not self.mac? end # ---------------------------------------------------- # mac? method # # Returns true if the host OS is OS X. # @return Bool # ---------------------------------------------------- def OS.mac? !(/darwin/ =~ RUBY_PLATFORM).nil? end # ---------------------------------------------------- # unix? method # # Returns true if the host OS is Unix. # @return Bool # ---------------------------------------------------- def OS.unix? !self.windows? end # ---------------------------------------------------- # windows? method # # Returns true if the host OS is Windows # @return Bool # ---------------------------------------------------- def OS.windows? !(/cygwin|mswin|mingw|bccwin|wince|emx/ =~ RUBY_PLATFORM).nil? end end end
Version data entries
13 entries across 13 versions & 1 rubygems