Module: Padrino::Performance::OS

Defined in:
padrino-performance/lib/padrino-performance/os.rb

Overview

Class Method Summary collapse

Class Method Details

.linux?Boolean



18
19
20
# File 'padrino-performance/lib/padrino-performance/os.rb', line 18

def self.linux?
  self.unix? and not self.mac?
end

.mac?Boolean



10
11
12
# File 'padrino-performance/lib/padrino-performance/os.rb', line 10

def self.mac?
 (/darwin/ =~ RbConfig::CONFIG['target_os']) != nil
end

.unix?Boolean



14
15
16
# File 'padrino-performance/lib/padrino-performance/os.rb', line 14

def self.unix?
  !self.windows?
end

.windows?Boolean



6
7
8
# File 'padrino-performance/lib/padrino-performance/os.rb', line 6

def self.windows?
  (/cygwin|mswin|mingw|bccwin|wince|emx/ =~ RbConfig::CONFIG['target_os']) != nil
end