module FFI::Library

def ffi_lib(*names)

Raises:
  • (LoadError) - if a library cannot be opened

Returns:
  • (Array) -

Parameters:
  • names (Array) -- names of libraries to load
def ffi_lib(*names)
  raise LoadError.new("library names list must not be empty") if names.empty?
  lib_flags = defined?(@ffi_lib_flags) && @ffi_lib_flags
  @ffi_libs = names.map do |name|
    FFI::DynamicLibrary.send(:load_library, name, lib_flags)
  end
end