Module: CoRE::OS

Defined in:
lib/core/os.rb

Class Method Summary collapse

Class Method Details

.linux?Boolean

Returns:

  • (Boolean)

3
4
5
# File 'lib/core/os.rb', line 3

def self.linux?
  @@linux ||= !!(os =~ /^linux/)
end

.osObject


7
8
9
# File 'lib/core/os.rb', line 7

def self.os
  RbConfig::CONFIG['host_os']
end

.osx?Boolean

Returns:

  • (Boolean)

11
12
13
# File 'lib/core/os.rb', line 11

def self.osx?
  @@osx ||= !!(os =~ /^darwin/)
end