Class: Sbire::OS
- Inherits:
-
Object
- Object
- Sbire::OS
- Defined in:
- lib/sbire/os.rb
Class Method Summary collapse
Class Method Details
.familly ⇒ Object
3 4 5 6 7 |
# File 'lib/sbire/os.rb', line 3 def self.familly return "win" if OS.windows? return "linux" if OS.unix? || OS.linux? return "mac" if OS.mac? end |
.linux? ⇒ Boolean
21 22 23 |
# File 'lib/sbire/os.rb', line 21 def self.linux? OS.unix? and not OS.mac? end |
.mac? ⇒ Boolean
13 14 15 |
# File 'lib/sbire/os.rb', line 13 def self.mac? (/darwin/ =~ RUBY_PLATFORM) != nil end |
.windows? ⇒ Boolean
9 10 11 |
# File 'lib/sbire/os.rb', line 9 def self.windows? (/cygwin|mswin|mingw|bccwin|wince|emx/ =~ RUBY_PLATFORM) != nil end |