Sha256: 85950dd4a34600bb1ff08e699a48d6f1c5f47cb8a028d145aed0d90d84e6eb2e
Contents?: true
Size: 1.14 KB
Versions: 1
Compression:
Stored size: 1.14 KB
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 # Return the current Ruby engine as a symbol def self.engine return :jruby if jruby? return :ruby if ruby? :unknown end # Check if the current Ruby engine is JRuby def self.jruby? @jruby || RUBY_ENGINE == "jruby" end # Check if the current Ruby engine is MRI def self.ruby? @ruby || RUBY_ENGINE == "ruby" end # Return the current Ruby version as a Gem::Version def self.ruby_version Lizarb.ruby_version end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
lizarb-1.0.4 | lib/dev_system/dev/controllers/shell.rb |