Sha256: a238d5e85e37e7dcfc4fa42ac947dec0bac89c8453ae91684771431fd1517e8f

Contents?: true

Size: 727 Bytes

Versions: 15

Compression:

Stored size: 727 Bytes

Contents

require 'gir_ffi/builders/registered_type_builder'
require 'gir_ffi/interface_base'

module GirFFI
  module Builders
    # Implements the creation of a module representing an Interface.
    class InterfaceBuilder < RegisteredTypeBuilder
      def interface_struct
        @interface_struct ||= Builder.build_class iface_struct_info
      end

      private

      def klass
        @klass ||= get_or_define_module namespace_module, @classname
      end

      # FIXME: The word 'class' is not really correct.
      def setup_class
        klass.extend InterfaceBase
        setup_constants
        stub_methods
      end

      def iface_struct_info
        @iface_struct_info ||= info.iface_struct
      end
    end
  end
end

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
gir_ffi-0.9.2 lib/gir_ffi/builders/interface_builder.rb
gir_ffi-0.9.1 lib/gir_ffi/builders/interface_builder.rb
gir_ffi-0.9.0 lib/gir_ffi/builders/interface_builder.rb
gir_ffi-0.8.6 lib/gir_ffi/builders/interface_builder.rb
gir_ffi-0.8.5 lib/gir_ffi/builders/interface_builder.rb
gir_ffi-0.8.4 lib/gir_ffi/builders/interface_builder.rb
gir_ffi-0.8.3 lib/gir_ffi/builders/interface_builder.rb
gir_ffi-0.8.2 lib/gir_ffi/builders/interface_builder.rb
gir_ffi-0.8.1 lib/gir_ffi/builders/interface_builder.rb
gir_ffi-0.8.0 lib/gir_ffi/builders/interface_builder.rb
gir_ffi-0.7.10 lib/gir_ffi/builders/interface_builder.rb
gir_ffi-0.7.9 lib/gir_ffi/builders/interface_builder.rb
gir_ffi-0.7.8 lib/gir_ffi/builders/interface_builder.rb
gir_ffi-0.7.7 lib/gir_ffi/builders/interface_builder.rb
gir_ffi-0.7.6 lib/gir_ffi/builders/interface_builder.rb