Sha256: f0c642f9698c6ad9b602c881c62b091eac419b9c225592afce9badd10739536b

Contents?: true

Size: 675 Bytes

Versions: 6

Compression:

Stored size: 675 Bytes

Contents

require 'gir_ffi/builder_helper'

module GirFFI
  module InfoExt
    # Extensions for GObjectIntrospection::IRegisteredTypeInfo needed by GirFFI
    module IRegisteredTypeInfo
      def to_ffi_type
        to_type.to_ffi_type
      end

      def to_type
        Builder.build_class self
      end

      def find_instance_method(method)
        info = find_method method
        return info if info && info.method?
      end

      def find_method(_method)
        raise 'Must be overridden in subclass'
      end
    end
  end
end

GObjectIntrospection::IRegisteredTypeInfo.send :include,
                                               GirFFI::InfoExt::IRegisteredTypeInfo

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
gir_ffi-0.9.2 lib/gir_ffi/info_ext/i_registered_type_info.rb
gir_ffi-0.9.1 lib/gir_ffi/info_ext/i_registered_type_info.rb
gir_ffi-0.9.0 lib/gir_ffi/info_ext/i_registered_type_info.rb
gir_ffi-0.8.6 lib/gir_ffi/info_ext/i_registered_type_info.rb
gir_ffi-0.8.5 lib/gir_ffi/info_ext/i_registered_type_info.rb
gir_ffi-0.8.4 lib/gir_ffi/info_ext/i_registered_type_info.rb