Class: OS

Inherits:
Object
  • Object
show all
Defined in:
lib/rakepp/os.rb

Class Method Summary collapse

Class Method Details

.linux?Boolean

Returns:

  • (Boolean)


8
9
10
# File 'lib/rakepp/os.rb', line 8

def self.linux?
  return RUBY_PLATFORM.index('linux') != nil
end

.osx?Boolean

Returns:

  • (Boolean)


5
6
7
# File 'lib/rakepp/os.rb', line 5

def self.osx?
  return RUBY_PLATFORM.index('darwin') != nil
end

.windows?Boolean

Returns:

  • (Boolean)


2
3
4
# File 'lib/rakepp/os.rb', line 2

def self.windows?
  return (RUBY_PLATFORM =~ /win32/i) != nil
end