Sha256: 6c3708ea563fb66b190c1ef32db154e25f1ef6dad344074b9dbfd058487f6e60

Contents?: true

Size: 601 Bytes

Versions: 10

Compression:

Stored size: 601 Bytes

Contents

require 'gir_ffi/builder/type/base'
module GirFFI
  module Builder
    module Type

      # 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 Constant < Base
        private

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

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
gir_ffi-0.6.6 lib/gir_ffi/builder/type/constant.rb
gir_ffi-0.6.5 lib/gir_ffi/builder/type/constant.rb
gir_ffi-0.6.4 lib/gir_ffi/builder/type/constant.rb
gir_ffi-0.6.3 lib/gir_ffi/builder/type/constant.rb
gir_ffi-0.6.2 lib/gir_ffi/builder/type/constant.rb
gir_ffi-0.6.1 lib/gir_ffi/builder/type/constant.rb
gir_ffi-0.6.0 lib/gir_ffi/builder/type/constant.rb
gir_ffi-0.5.2 lib/gir_ffi/builder/type/constant.rb
gir_ffi-0.5.1 lib/gir_ffi/builder/type/constant.rb
gir_ffi-0.5.0 lib/gir_ffi/builder/type/constant.rb