Class: RLTK::CG::Context
- Includes:
- BindingClass
- Defined in:
- lib/rltk/cg/context.rb
Overview
Bindings for LLVM contexts.
Instance Attribute Summary
Attributes included from BindingClass
Class Method Summary collapse
-
.global ⇒ Context
A global context.
Instance Method Summary collapse
-
#dispose ⇒ void
Frees the resources used by LLVM for this context.
-
#initialize(ptr = nil) ⇒ Context
constructor
A new instance of Context.
Methods included from BindingClass
Constructor Details
#initialize(ptr = nil) ⇒ Context
Returns a new instance of Context.
37 38 39 |
# File 'lib/rltk/cg/context.rb', line 37 def initialize(ptr = nil) @ptr = ptr || Bindings.context_create() end |
Class Method Details
.global ⇒ Context
Returns A global context.
28 29 30 |
# File 'lib/rltk/cg/context.rb', line 28 def self.global self.new(Bindings.get_global_context()) end |
Instance Method Details
#dispose ⇒ void
This method returns an undefined value.
Frees the resources used by LLVM for this context.
44 45 46 47 48 49 |
# File 'lib/rltk/cg/context.rb', line 44 def dispose if @ptr Bindings.context_dispose(@ptr) @ptr = nil end end |