Sha256: f68fb35b77d62c941244d4617165544f92d7497bdb4c2f8c73058e08d18eb7f0

Contents?: true

Size: 571 Bytes

Versions: 7

Compression:

Stored size: 571 Bytes

Contents

# frozen_string_literal: true

require 'pathname'

module FFI
  module Libfuse
    module Adapter
      # Wrapper module to convert first path argument of callback methods to a {::Pathname}
      module Pathname
        # @!visibility private
        def fuse_wrappers(*wrappers)
          wrappers << {
            wrapper: proc { |_fuse_method, path, *args, &b| b.call(::Pathname.new(path), *args) },
            excludes: %i[init destroy]
          }
          return wrappers unless defined?(super)

          super(*wrappers)
        end
      end
    end
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
ffi-libfuse-0.4.0 lib/ffi/libfuse/adapter/pathname.rb
ffi-libfuse-0.3.4 lib/ffi/libfuse/adapter/pathname.rb
ffi-libfuse-0.3.3 lib/ffi/libfuse/adapter/pathname.rb
ffi-libfuse-0.1.0.rc20220550 lib/ffi/libfuse/adapter/pathname.rb
ffi-libfuse-0.0.1.rctest12 lib/ffi/libfuse/adapter/pathname.rb
ffi-libfuse-0.0.1.rctest11 lib/ffi/libfuse/adapter/pathname.rb
ffi-libfuse-0.0.1.pre lib/ffi/libfuse/adapter/pathname.rb