Class: GirFFI::BaseTypeBuilder
- Inherits:
-
Object
- Object
- GirFFI::BaseTypeBuilder
- Includes:
- BuilderHelper
- Defined in:
- lib/gir_ffi/builders/base_type_builder.rb
Overview
Base class for type builders.
Direct Known Subclasses
GirFFI::Builders::CallbackBuilder, GirFFI::Builders::ConstantBuilder, GirFFI::Builders::RegisteredTypeBuilder, GirFFI::Builders::SignalClosureBuilder, GirFFI::Builders::VFuncBuilder
Instance Attribute Summary collapse
-
#info ⇒ Object
readonly
Returns the value of attribute info.
Instance Method Summary collapse
- #build_class ⇒ Object
-
#initialize(info) ⇒ BaseTypeBuilder
constructor
A new instance of BaseTypeBuilder.
- #instantiate_class ⇒ Object
Methods included from BuilderHelper
#get_or_define_class, #get_or_define_module, #optionally_define_constant
Constructor Details
#initialize(info) ⇒ BaseTypeBuilder
Returns a new instance of BaseTypeBuilder.
10 11 12 13 14 |
# File 'lib/gir_ffi/builders/base_type_builder.rb', line 10 def initialize(info) @info = info @namespace = @info.namespace @classname = @info.safe_name end |
Instance Attribute Details
#info ⇒ Object (readonly)
Returns the value of attribute info.
25 26 27 |
# File 'lib/gir_ffi/builders/base_type_builder.rb', line 25 def info @info end |
Instance Method Details
#build_class ⇒ Object
16 17 18 19 |
# File 'lib/gir_ffi/builders/base_type_builder.rb', line 16 def build_class instantiate_class unless defined? @klass @klass end |
#instantiate_class ⇒ Object
21 22 23 |
# File 'lib/gir_ffi/builders/base_type_builder.rb', line 21 def instantiate_class setup_class unless already_set_up end |