Sha256: 26b45dd58594563a8ed13b6c6be02ec976554a0f8ef953e4b333d001c5df4fd5

Contents?: true

Size: 371 Bytes

Versions: 9

Compression:

Stored size: 371 Bytes

Contents

# frozen_string_literal: true

module GirFFI
  # Simple wrapper class to represent the implementation of a VFunc.
  class VFuncImplementation
    attr_reader :name, :implementation

    def initialize(name, implementation)
      implementation ||= ->(obj, *args) { obj.public_send name, *args }
      @name = name
      @implementation = implementation
    end
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
gir_ffi-0.17.0 lib/gir_ffi/vfunc_implementation.rb
gir_ffi-0.16.1 lib/gir_ffi/vfunc_implementation.rb
gir_ffi-0.16.0 lib/gir_ffi/vfunc_implementation.rb
gir_ffi-0.15.9 lib/gir_ffi/vfunc_implementation.rb
gir_ffi-0.15.8 lib/gir_ffi/vfunc_implementation.rb
gir_ffi-0.15.7 lib/gir_ffi/vfunc_implementation.rb
gir_ffi-0.15.6 lib/gir_ffi/vfunc_implementation.rb
gir_ffi-0.15.5 lib/gir_ffi/vfunc_implementation.rb
gir_ffi-0.15.4 lib/gir_ffi/vfunc_implementation.rb