Module: NativeExtFetcher::Platform

Defined in:
lib/native_ext_fetcher/platform.rb

Constant Summary collapse

HOST_OS =
determine_host_os.freeze
HOST_ARCH =
determine_host_arch.freeze
HOST_DLEXT =
determine_host_dlext.freeze
HOST_STATIC_EXT =
determine_host_static_ext(HOST_OS).freeze

Class Method Summary collapse

Class Method Details

.native_extension_file_extObject



75
76
77
# File 'lib/native_ext_fetcher/platform.rb', line 75

def self.native_extension_file_ext
  ".#{HOST_DLEXT}"
end

.native_extension_file_postfixObject



67
68
69
# File 'lib/native_ext_fetcher/platform.rb', line 67

def self.native_extension_file_postfix
  "-#{HOST_OS}-#{HOST_ARCH}.#{HOST_DLEXT}"
end

.native_extension_keyObject



63
64
65
# File 'lib/native_ext_fetcher/platform.rb', line 63

def self.native_extension_key
  :"#{HOST_OS}_#{HOST_ARCH}"
end

.native_extension_static_file_extObject



79
80
81
# File 'lib/native_ext_fetcher/platform.rb', line 79

def self.native_extension_static_file_ext
  ".#{HOST_STATIC_EXT}"
end

.native_extension_static_file_postfixObject



71
72
73
# File 'lib/native_ext_fetcher/platform.rb', line 71

def self.native_extension_static_file_postfix
  "-#{HOST_OS}-#{HOST_ARCH}.#{HOST_STATIC_EXT}"
end

.native_extension_tupleObject



83
84
85
# File 'lib/native_ext_fetcher/platform.rb', line 83

def self.native_extension_tuple
  [HOST_ARCH, HOST_OS]
end