Sha256: 9a73501bb92782536f05ffcae336246c2c9ca4b1b390959cfbd7ca16f8479e99
Contents?: true
Size: 630 Bytes
Versions: 18
Compression:
Stored size: 630 Bytes
Contents
require 'rbconfig' module Overcommit # Methods relating to the current operating system module OS class << self def windows? !(/mswin|msys|mingw|bccwin|wince|emc/ =~ host_os).nil? end def cygwin? !(/cygwin/ =~ host_os).nil? end def mac? !(/darwin|mac os/ =~ host_os).nil? end def unix? !windows? end def linux? unix? && !mac? && !cygwin? end private def host_os @os ||= ::RbConfig::CONFIG['host_os'].freeze end end SEPARATOR = (windows? ? '\\' : File::SEPARATOR).freeze end end
Version data entries
18 entries across 18 versions & 1 rubygems