Module: Bridgetown::OS

Defined in:
lib/bridgetown-webp/webpExec.rb

Overview

module Webp

Class Method Summary collapse

Class Method Details

.linux?Boolean

Returns:

  • (Boolean)


92
93
94
# File 'lib/bridgetown-webp/webpExec.rb', line 92

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

.mac?Boolean

Returns:

  • (Boolean)


84
85
86
# File 'lib/bridgetown-webp/webpExec.rb', line 84

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

.unix?Boolean

Returns:

  • (Boolean)


88
89
90
# File 'lib/bridgetown-webp/webpExec.rb', line 88

def OS.unix?
  !OS.windows?
end

.windows?Boolean

Returns:

  • (Boolean)


80
81
82
# File 'lib/bridgetown-webp/webpExec.rb', line 80

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

.x32?Boolean

Returns:

  • (Boolean)


96
97
98
# File 'lib/bridgetown-webp/webpExec.rb', line 96

def OS.x32?
  return 1.size != 8
end

.x64?Boolean

Returns:

  • (Boolean)


100
101
102
# File 'lib/bridgetown-webp/webpExec.rb', line 100

def OS.x64?
  return 1.size == 8
end