Class: GirFFI::Builder::Type::Base
- Inherits:
-
Object
- Object
- GirFFI::Builder::Type::Base
- Includes:
- GirFFI::BuilderHelper
- Defined in:
- lib/gir_ffi/builder/type/base.rb
Overview
Base class for type builders.
Direct Known Subclasses
Instance Attribute Summary collapse
-
#info ⇒ Object
readonly
Returns the value of attribute info.
Instance Method Summary collapse
- #build_class ⇒ Object
-
#initialize(info) ⇒ Base
constructor
A new instance of Base.
Methods included from GirFFI::BuilderHelper
#const_defined_for, #optionally_define_constant
Constructor Details
#initialize(info) ⇒ Base
11 12 13 14 15 |
# File 'lib/gir_ffi/builder/type/base.rb', line 11 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.
24 25 26 |
# File 'lib/gir_ffi/builder/type/base.rb', line 24 def info @info end |
Instance Method Details
#build_class ⇒ Object
17 18 19 20 21 22 |
# File 'lib/gir_ffi/builder/type/base.rb', line 17 def build_class unless defined? @klass instantiate_class end @klass end |