Module: OS

Defined in:
ext/pandoc_rb/extconf.rb

Class Method Summary collapse

Class Method Details

.linux?Boolean

Returns:

  • (Boolean)


20
21
22
# File 'ext/pandoc_rb/extconf.rb', line 20

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

.mac?Boolean

Returns:

  • (Boolean)


12
13
14
# File 'ext/pandoc_rb/extconf.rb', line 12

def OS.mac?
 (/darwin/ =~ RUBY_PLATFORM) != nil
end

.unix?Boolean

Returns:

  • (Boolean)


16
17
18
# File 'ext/pandoc_rb/extconf.rb', line 16

def OS.unix?
  !OS.windows?
end

.windows?Boolean

Returns:

  • (Boolean)


8
9
10
# File 'ext/pandoc_rb/extconf.rb', line 8

def OS.windows?
  (/cygwin|mswin|mingw|bccwin|wince|emx/ =~ RUBY_PLATFORM) != nil
end