Module: CLI::UI::OS
- Defined in:
- lib/cli/ui/os.rb
Defined Under Namespace
Class Method Summary collapse
-
.current ⇒ Object
Determines which OS is currently running the UI, to make it easier to adapt its behaviour to the features of the OS.
Class Method Details
.current ⇒ Object
Determines which OS is currently running the UI, to make it easier to adapt its behaviour to the features of the OS.
6 7 8 9 10 11 12 13 14 15 16 17 |
# File 'lib/cli/ui/os.rb', line 6 def self.current @current_os ||= case RUBY_PLATFORM when /darwin/ Mac when /linux/ Linux when /mingw32/ Windows else raise "Could not determine OS from platform #{RUBY_PLATFORM}" end end |