Sha256: f4d76fe7aebe1c8d851e802bc4ab7e10838f68533d7c8cfac02f1bda6eae3295
Contents?: true
Size: 606 Bytes
Versions: 12
Compression:
Stored size: 606 Bytes
Contents
require 'rbconfig' module Chozo # @author Jamie Winsor <jamie@vialstudios.com> module Platform module ClassMethods # @return [Boolean] def windows? (RbConfig::CONFIG['host_os'] =~ /mswin|mingw|cygwin/) ? true : false end def osx? (RbConfig::CONFIG['host_os'] =~ /darwin/) ? true : false end def linux? (RbConfig::CONFIG['host_os'] =~ /linux/) ? true : false end end class << self def included(base) base.send(:include, Platform::ClassMethods) end end extend Platform::ClassMethods end end
Version data entries
12 entries across 12 versions & 1 rubygems