Module: OS
- Included in:
- Browser
- Defined in:
- lib/browser.rb
Overview
detect operating system
Class Method Summary collapse
Class Method Details
.linux? ⇒ Boolean
12 13 14 |
# File 'lib/browser.rb', line 12 def OS.linux? not (OS.windows? or OS.mac?) end |
.mac? ⇒ Boolean
8 9 10 |
# File 'lib/browser.rb', line 8 def OS.mac? (/darwin/ =~ RUBY_PLATFORM) != nil end |
.windows? ⇒ Boolean
4 5 6 |
# File 'lib/browser.rb', line 4 def OS.windows? (/cygwin|mswin|mingw|bccwin|wince|emx/ =~ RUBY_PLATFORM) != nil end |