Module: GirFFI::Builder::Type

Defined in:
lib/gir_ffi/builder/type.rb,
lib/gir_ffi/builder/type/base.rb,
lib/gir_ffi/builder/type/enum.rb,
lib/gir_ffi/builder/type/union.rb,
lib/gir_ffi/builder/type/object.rb,
lib/gir_ffi/builder/type/struct.rb,
lib/gir_ffi/builder/type/callback.rb,
lib/gir_ffi/builder/type/constant.rb,
lib/gir_ffi/builder/type/interface.rb,
lib/gir_ffi/builder/type/with_layout.rb,
lib/gir_ffi/builder/type/user_defined.rb,
lib/gir_ffi/builder/type/with_methods.rb,
lib/gir_ffi/builder/type/registered_type.rb,
lib/gir_ffi/builder/type/unintrospectable.rb

Defined Under Namespace

Modules: WithLayout, WithMethods Classes: Base, Callback, Constant, Enum, Interface, Object, RegisteredType, Struct, Unintrospectable, Union, UserDefined

Constant Summary collapse

CACHE =
{}
TYPE_MAP =
{
  :callback => Callback,
  :constant => Constant,
  :enum => Enum,
  :flags => Enum,
  :interface => Interface,
  :object => Object,
  :struct => Struct,
  :union => Union,
  :unintrospectable => Unintrospectable
}

Class Method Summary collapse

Class Method Details

.build(info) ⇒ Object



29
30
31
# File 'lib/gir_ffi/builder/type.rb', line 29

def self.build info
  TYPE_MAP[info.info_type].new(info).build_class
end

.builder_for(info) ⇒ Object

TODO: Pull up to include :function and :module



34
35
36
# File 'lib/gir_ffi/builder/type.rb', line 34

def self.builder_for info
  TYPE_MAP[info.info_type].new(info)
end