Class: LLVM::Module::TypeCollection
- Inherits:
-
Object
- Object
- LLVM::Module::TypeCollection
- Defined in:
- lib/llvm/core/module.rb
Instance Method Summary collapse
-
#initialize(mod) ⇒ TypeCollection
constructor
A new instance of TypeCollection.
-
#named(name) ⇒ Object
(also: #[])
Returns the Type with the given name (symbol or string).
Constructor Details
#initialize(mod) ⇒ TypeCollection
Returns a new instance of TypeCollection.
61 62 63 |
# File 'lib/llvm/core/module.rb', line 61 def initialize(mod) @module = mod end |
Instance Method Details
#named(name) ⇒ Object Also known as: []
Returns the Type with the given name (symbol or string).
66 67 68 |
# File 'lib/llvm/core/module.rb', line 66 def named(name) Type.from_ptr(C.get_type_by_name(@module, name.to_s), nil) end |