class Trop::OS
OS
detection lib
Public Class Methods
jruby?()
click to toggle source
@return true/false if 'on jruby?'
# File lib/trop/os.rb, line 27 def self.jruby? (RUBY_ENGINE == 'jruby') end
linux?()
click to toggle source
@return true/false if 'on tux?'
# File lib/trop/os.rb, line 22 def self.linux? ::Trop::OS.unix? and not ::Trop::OS.mac? end
mac?()
click to toggle source
@return true/false if 'on mac?'
# File lib/trop/os.rb, line 12 def self.mac? (/darwin/ =~ RUBY_PLATFORM) != nil end
unix?()
click to toggle source
@return true/false if 'on unix?'
# File lib/trop/os.rb, line 17 def self.unix? !::Trop::OS.win? end
win?()
click to toggle source
@return true/false if 'on windows ?'
# File lib/trop/os.rb, line 7 def self.win? (/cygwin|mswin|mingw|bccwin|wince|emx/ =~ RUBY_PLATFORM) != nil end