Module: Jinx::OS
- Includes:
- Config
- Defined in:
- lib/jinx/helpers/os.rb
Overview
Operating system methods.
Class Method Summary collapse
-
.os_type ⇒ System
The operating system type
:windows
,:linux
,:mac
,:solaris
, or:other
.
Class Method Details
.os_type ⇒ System
Returns the operating system type :windows
, :linux
, :mac
, :solaris
, or :other
.
9 10 11 12 13 14 15 16 17 |
# File 'lib/jinx/helpers/os.rb', line 9 def self.os_type case CONFIG['host_os'] when /mswin|windows/i then :windows when /linux/i then :linux when /darwin/i then :mac when /sunos|solaris/i then :solaris else :other end end |