Module: Skylight::Util::Platform Private

Defined in:
lib/skylight/util/platform.rb

This module is part of a private API. You should avoid using this module if possible, as it may be removed or be changed in the future.

Constant Summary collapse

OS =

This constant is part of a private API. You should avoid using this constant if possible, as it may be removed or be changed in the future.

Normalize the platform OS

case os = RbConfig::CONFIG['host_os'].downcase
when /linux/
  "linux"
when /darwin/
  "darwin"
when /freebsd/
  "freebsd"
when /netbsd/
  "netbsd"
when /openbsd/
  "openbsd"
when /sunos|solaris/
  "solaris"
when /mingw|mswin/
  "windows"
else
  os
end
ARCH =

This constant is part of a private API. You should avoid using this constant if possible, as it may be removed or be changed in the future.

Normalize the platform CPU

case cpu = RbConfig::CONFIG['host_cpu'].downcase
when /amd64|x86_64/
  "x86_64"
when /i?86|x86|i86pc/
  "x86"
when /ppc|powerpc/
  "powerpc"
when /^arm/
  "arm"
else
  cpu
end
LIBEXT =

This constant is part of a private API. You should avoid using this constant if possible, as it may be removed or be changed in the future.

case OS
when /darwin/
  'dylib'
when /linux|bsd|solaris/
  'so'
when /windows|cygwin/
  'dll'
else
  'so'
end
TUPLE =

This constant is part of a private API. You should avoid using this constant if possible, as it may be removed or be changed in the future.

"#{ARCH}-#{OS}"

Class Method Summary collapse

Class Method Details

.dlextObject

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



62
63
64
# File 'lib/skylight/util/platform.rb', line 62

def self.dlext
  RbConfig::CONFIG['DLEXT']
end

.libextObject

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



58
59
60
# File 'lib/skylight/util/platform.rb', line 58

def self.libext
  LIBEXT
end

.tupleObject

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



54
55
56
# File 'lib/skylight/util/platform.rb', line 54

def self.tuple
  TUPLE
end