Sha256: 544b661884bdb0e0911945bd2baaea2b88b3774fb07bdbc2c33293499c6121e8

Contents?: true

Size: 560 Bytes

Versions: 15

Compression:

Stored size: 560 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
      def build_class
        @klass ||= optionally_define_constant namespace_module, @classname do
          info.value
        end
      end
    end
  end
end

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
gir_ffi-0.9.2 lib/gir_ffi/builders/constant_builder.rb
gir_ffi-0.9.1 lib/gir_ffi/builders/constant_builder.rb
gir_ffi-0.9.0 lib/gir_ffi/builders/constant_builder.rb
gir_ffi-0.8.6 lib/gir_ffi/builders/constant_builder.rb
gir_ffi-0.8.5 lib/gir_ffi/builders/constant_builder.rb
gir_ffi-0.8.4 lib/gir_ffi/builders/constant_builder.rb
gir_ffi-0.8.3 lib/gir_ffi/builders/constant_builder.rb
gir_ffi-0.8.2 lib/gir_ffi/builders/constant_builder.rb
gir_ffi-0.8.1 lib/gir_ffi/builders/constant_builder.rb
gir_ffi-0.8.0 lib/gir_ffi/builders/constant_builder.rb
gir_ffi-0.7.10 lib/gir_ffi/builders/constant_builder.rb
gir_ffi-0.7.9 lib/gir_ffi/builders/constant_builder.rb
gir_ffi-0.7.8 lib/gir_ffi/builders/constant_builder.rb
gir_ffi-0.7.7 lib/gir_ffi/builders/constant_builder.rb
gir_ffi-0.7.6 lib/gir_ffi/builders/constant_builder.rb