Class: GirFFI::Builders::ConstantBuilder
- Inherits:
-
GirFFI::BaseTypeBuilder
- Object
- GirFFI::BaseTypeBuilder
- GirFFI::Builders::ConstantBuilder
- Defined in:
- lib/gir_ffi/builders/constant_builder.rb
Overview
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.
Instance Attribute Summary
Attributes inherited from GirFFI::BaseTypeBuilder
Instance Method Summary collapse
Methods inherited from GirFFI::BaseTypeBuilder
#initialize, #instantiate_class
Methods included from GirFFI::BuilderHelper
#get_or_define_class, #get_or_define_module, #optionally_define_constant
Constructor Details
This class inherits a constructor from GirFFI::BaseTypeBuilder
Instance Method Details
#build_class ⇒ Object
11 12 13 14 15 |
# File 'lib/gir_ffi/builders/constant_builder.rb', line 11 def build_class @klass ||= optionally_define_constant namespace_module, @classname do info.value end end |