Sha256: debb8a1a8c70a7213c54a62da83a49d4d094d18c5b99743c06f9076a331f5ab7
Contents?: true
Size: 719 Bytes
Versions: 1
Compression:
Stored size: 719 Bytes
Contents
class OS require 'rbconfig' host_os = RbConfig::CONFIG['host_os'] if host_os =~ /mswin|mingw/ WINDOZE = true else WINDOZE = false end # OS.windows? # true if on windows [and/or jruby] # false if on linux or cygwin def self.windows? WINDOZE end def self.linux? !WINDOZE end class << self alias :windoze? :windows? #the joke one end if host_os =~ /32/ BITS = 32 else if host_os =~ /64/ BITS = 64 else # cygwin if (1<<32).class == Fixnum BITS = 64 else BITS = 32 end end end def self.bits BITS end def self.java? if RUBY_PLATFORM =~ /java/ true else false end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
os-0.3.0 | lib/os.rb |