Sha256: 3ba93d40d420c451d1b02eb4747c67bdbeda2f4433cdb59f229c3b42b429ea0b

Contents?: true

Size: 745 Bytes

Versions: 5

Compression:

Stored size: 745 Bytes

Contents

require 'gir_ffi/builder/type/registered_type'
require 'gir_ffi/builder/type/with_methods'
require 'gir_ffi/interface_base'

module GirFFI
  module Builder
    module Type

      # Implements the creation of a module representing an Interface.
      class Interface < RegisteredType
        include WithMethods

        private

        # FIXME: The word 'class' is not really correct.
        def instantiate_class
          @klass = optionally_define_constant(namespace_module, @classname) do
            ::Module.new
          end
          setup_module unless already_set_up
        end

        def setup_module
          @klass.extend InterfaceBase
          setup_constants
          stub_methods
        end
      end
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
gir_ffi-0.1.0 lib/gir_ffi/builder/type/interface.rb
gir_ffi-0.0.14 lib/gir_ffi/builder/type/interface.rb
gir_ffi-0.0.13 lib/gir_ffi/builder/type/interface.rb
gir_ffi-0.0.12 lib/gir_ffi/builder/type/interface.rb
gir_ffi-0.0.11 lib/gir_ffi/builder/type/interface.rb