Module: CommandKit::OS::ClassMethods
- Defined in:
- lib/command_kit/os.rb
Instance Method Summary collapse
-
#os ⇒ :linux, ...
Determines the current OS.
Instance Method Details
#os ⇒ :linux, ...
Determines the current OS.
66 67 68 69 70 71 72 73 74 |
# File 'lib/command_kit/os.rb', line 66 def os if RUBY_PLATFORM.include?('linux') then :linux elsif RUBY_PLATFORM.include?('darwin') then :macos elsif RUBY_PLATFORM.include?('freebsd') then :freebsd elsif RUBY_PLATFORM.include?('openbsd') then :openbsd elsif RUBY_PLATFORM.include?('netbsd') then :netbsd elsif Gem.win_platform? then :windows end end |