Module: GirFFI::Builders::StructLike

Includes:
WithLayout
Included in:
StructBuilder, UnintrospectableBoxedBuilder, UnionBuilder
Defined in:
lib/gir_ffi/builders/struct_like.rb

Overview

Implements base methods used by struct and union builders

Instance Method Summary collapse

Methods included from WithLayout

#layout_specification

Instance Method Details

#setup_classObject



11
12
13
14
15
16
# File 'lib/gir_ffi/builders/struct_like.rb', line 11

def setup_class
  setup_layout
  setup_constants
  stub_methods
  setup_field_accessors
end

#setup_field_accessorsObject



18
19
20
21
22
# File 'lib/gir_ffi/builders/struct_like.rb', line 18

def setup_field_accessors
  fields.each do |finfo|
    FieldBuilder.new(finfo, klass).build
  end
end