Sha256: 35c729aa86e4417aad0e698c33db060ba824d3d64e2d96d068e948bec397f240

Contents?: true

Size: 486 Bytes

Versions: 4

Compression:

Stored size: 486 Bytes

Contents

# frozen_string_literal: true
require 'gir_ffi/builders/with_layout'

module GirFFI
  module Builders
    # Implements base methods used by struct and union builders
    module StructLike
      include WithLayout

      def setup_class
        setup_layout
        setup_constants
        stub_methods
        setup_field_accessors
      end

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

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
gir_ffi-0.10.2 lib/gir_ffi/builders/struct_like.rb
gir_ffi-0.10.1 lib/gir_ffi/builders/struct_like.rb
gir_ffi-0.10.0 lib/gir_ffi/builders/struct_like.rb
gir_ffi-0.10.0.pre1 lib/gir_ffi/builders/struct_like.rb