Sha256: bf153a22036f452f157d31ec9c2edb00e4284f62c33b1e9c5fcf1ee4d187b4fa
Contents?: true
Size: 578 Bytes
Versions: 10
Compression:
Stored size: 578 Bytes
Contents
# frozen_string_literal: true require "ffi-libarchive-binary/version" require "ffi" require "pathname" module LibarchiveBinary class Error < StandardError; end module LibraryPath LIBRARY_PATH = Pathname.new(File.join(__dir__, "ffi-libarchive-binary")) def ffi_lib(*names) prefixed = names.map do |name| paths = name.is_a?(Array) ? name : [name] paths.map { |x| LIBRARY_PATH.join(FFI::map_library_name(x)).to_s } end super(*(prefixed + names)) end end ::FFI::Library.prepend(LibraryPath) require "ffi-libarchive" end
Version data entries
10 entries across 10 versions & 1 rubygems