Method: CLI::UI::OS.current
- Defined in:
- lib/cli/ui/os.rb
.current ⇒ Object
42 43 44 45 46 47 48 49 50 51 52 53 54 55 |
# File 'lib/cli/ui/os.rb', line 42 def current @current_os ||= case RbConfig::CONFIG['host_os'] when /darwin/ MAC when /linux/ LINUX else if RUBY_PLATFORM !~ /cygwin/ && ENV['OS'] == 'Windows_NT' WINDOWS else raise "Could not determine OS from host_os #{RbConfig::CONFIG["host_os"]}" end end end |