Module: Cabriolet::Platform
- Defined in:
- lib/cabriolet/platform.rb
Overview
Platform detection for handling OS-specific behavior
Class Method Summary collapse
-
.supports_unix_permissions? ⇒ Boolean
Check if platform supports Unix file permissions.
-
.unix? ⇒ Boolean
Check if running on Unix-like system.
-
.windows? ⇒ Boolean
Check if running on Windows.
Class Method Details
.supports_unix_permissions? ⇒ Boolean
Check if platform supports Unix file permissions
23 24 25 |
# File 'lib/cabriolet/platform.rb', line 23 def self. unix? end |
.unix? ⇒ Boolean
Check if running on Unix-like system
16 17 18 |
# File 'lib/cabriolet/platform.rb', line 16 def self.unix? !windows? end |
.windows? ⇒ Boolean
Check if running on Windows
9 10 11 |
# File 'lib/cabriolet/platform.rb', line 9 def self.windows? RUBY_PLATFORM =~ /mswin|mingw|cygwin/ end |