Module: OS
- Included in:
- DailyProgress
- Defined in:
- lib/os.rb
Class Method Summary collapse
- .jruby? ⇒ Boolean
- .linux? ⇒ Boolean
- .mac? ⇒ Boolean
- .unix? ⇒ Boolean
- .windows? ⇒ Boolean
- .wsl? ⇒ Boolean
Class Method Details
.windows? ⇒ Boolean
2 3 4 |
# File 'lib/os.rb', line 2 def OS.windows? (/cygwin|mswin|mingw|bccwin|wince|emx/ =~ RUBY_PLATFORM) != nil end |
.wsl? ⇒ Boolean
22 23 24 25 |
# File 'lib/os.rb', line 22 def OS.wsl? version = File.read(WSL_VERSION_PATH) OS.linux? and (/microsoft|wsl/ =~ version.downcase) != nil end |