Sha256: aea5781522db9fb762af56afcfc86136f3703ef4e6a9e3918f5276e963cde85d
Contents?: true
Size: 704 Bytes
Versions: 2
Compression:
Stored size: 704 Bytes
Contents
class DevSystem::Shell < Liza::Controller # Check if the current platform is Windows def self.windows? @windows || Gem.win_platform? end # Check if the current platform is Unix or Unix-like def self.unix? @unix || !windows? end # Check if the current platform is Linux def self.linux? @linux || (unix? && RbConfig::CONFIG['host_os'].include?("linux")) end # Check if the current platform is Mac OS def self.mac? @mac || (unix? && RbConfig::CONFIG['host_os'].include?("darwin")) end # Return the current operating system as a symbol def self.os return :windows if windows? return :linux if linux? return :mac if mac? :unix end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
lizarb-1.0.3 | lib/dev_system/dev/controllers/shell.rb |
lizarb-1.0.2 | lib/dev_system/dev/controllers/shell.rb |