Sha256: 78313d5f7f06f8016afb98ec3fdcb3723824d3f156b6d764709c6dd2e439064d

Contents?: true

Size: 706 Bytes

Versions: 6

Compression:

Stored size: 706 Bytes

Contents

require 'gir_ffi/builders/object_builder'

module GirFFI
  module Builders
    # Implements the creation of a class representing an object type for
    # which no data is found in the GIR. Typically, these are created to
    # cast objects returned by a function that returns an interface.
    class UnintrospectableBuilder < ObjectBuilder
      def klass
        @klass ||= TypeBuilder::CACHE[target_gtype] ||= Class.new(superclass)
      end

      def setup_class
        setup_constants
        setup_layout
        setup_interfaces
      end

      def setup_instance_method(_method)
        false
      end

      private

      def ancestor_infos
        info.interfaces
      end
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
gir_ffi-0.8.5 lib/gir_ffi/builders/unintrospectable_builder.rb
gir_ffi-0.8.4 lib/gir_ffi/builders/unintrospectable_builder.rb
gir_ffi-0.8.3 lib/gir_ffi/builders/unintrospectable_builder.rb
gir_ffi-0.8.2 lib/gir_ffi/builders/unintrospectable_builder.rb
gir_ffi-0.8.1 lib/gir_ffi/builders/unintrospectable_builder.rb
gir_ffi-0.8.0 lib/gir_ffi/builders/unintrospectable_builder.rb