Sha256: 37f46de8c44d0e8887a3338ab2ef64b742c6520c11ff47b6a17cc5ad71ba50e4

Contents?: true

Size: 579 Bytes

Versions: 7

Compression:

Stored size: 579 Bytes

Contents

require 'gir_ffi/builders/base_type_builder'
module GirFFI
  module Builders
    # Implements the creation of a constant. Though semantically not a
    # type, its build method is like that of the types, in that it is
    # triggered by a missing constant in the parent namespace.  The
    # constant will be attached to the appropriate namespace module.
    class ConstantBuilder < BaseTypeBuilder
      private

      def instantiate_class
        @klass = optionally_define_constant namespace_module, @classname do
          info.value
        end
      end
    end
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
gir_ffi-0.7.5 lib/gir_ffi/builders/constant_builder.rb
gir_ffi-0.7.4 lib/gir_ffi/builders/constant_builder.rb
gir_ffi-0.7.3 lib/gir_ffi/builders/constant_builder.rb
gir_ffi-0.7.2 lib/gir_ffi/builders/constant_builder.rb
gir_ffi-0.7.1 lib/gir_ffi/builders/constant_builder.rb
gir_ffi-0.7.0 lib/gir_ffi/builders/constant_builder.rb
gir_ffi-0.6.7 lib/gir_ffi/builders/constant_builder.rb