Builds modules and classes based on information found in the introspection repository. Call its ::build_module and ::build_class methods to create the modules and classes used in your program.
TODO: Move elsewhere, perhaps to FunctionBuilder.
# File lib/gir_ffi/builder.rb, line 29 def self.attach_ffi_function lib, info sym = info.symbol return if lib.method_defined? sym lib.attach_function sym, info.argument_ffi_types, info.return_ffi_type end
# File lib/gir_ffi/builder.rb, line 17 def self.build_by_gtype gtype info = GObjectIntrospection::IRepository.default.find_by_gtype gtype info ||= UnintrospectableTypeInfo.new gtype build_class info end
# File lib/gir_ffi/builder.rb, line 13 def self.build_class info Builders::TypeBuilder.build(info) end
# File lib/gir_ffi/builder.rb, line 24 def self.build_module namespace, version=nil Builders::ModuleBuilder.new(namespace, version).generate end