Module: Booker::OS

Defined in:
lib/booker/config.rb

Overview

detect operating system

Class Method Summary collapse

Class Method Details

.linux?Boolean

Returns:

  • (Boolean)


19
# File 'lib/booker/config.rb', line 19

def self.linux? = !(windows? || mac?)

.mac?Boolean

Returns:

  • (Boolean)


17
# File 'lib/booker/config.rb', line 17

def self.mac? = RUBY_PLATFORM.match?(/darwin/)

.windows?Boolean

Returns:

  • (Boolean)


15
# File 'lib/booker/config.rb', line 15

def self.windows? = RUBY_PLATFORM.match?(/cygwin|mswin|mingw|bccwin|wince|emx/)