Class: UncleBlake3::Build::Platform

Inherits:
Object
  • Object
show all
Includes:
Singleton
Defined in:
lib/uncle_blake3/build/platform.rb

Overview

Constant Summary collapse

LIBSUFFIX =
::FFI::Platform.mac? ? 'bundle' : ::FFI::Platform::LIBSUFFIX

Instance Method Summary collapse

Instance Method Details

#archObject



20
21
22
# File 'lib/uncle_blake3/build/platform.rb', line 20

def arch
  ::FFI::Platform::ARCH
end

#mac?Boolean



32
33
34
# File 'lib/uncle_blake3/build/platform.rb', line 32

def mac?
  ::FFI::Platform.mac?
end

#map_library_name(name) ⇒ Object



16
17
18
# File 'lib/uncle_blake3/build/platform.rb', line 16

def map_library_name(name)
  "#{::FFI::Platform::LIBPREFIX}#{name}.#{LIBSUFFIX}"
end

#nameObject



28
29
30
# File 'lib/uncle_blake3/build/platform.rb', line 28

def name
  ::FFI::Platform.name
end

#osObject



24
25
26
# File 'lib/uncle_blake3/build/platform.rb', line 24

def os
  ::FFI::Platform::OS
end