Class: Wardite::Exports
- Inherits:
-
Object
- Object
- Wardite::Exports
- Defined in:
- lib/wardite.rb
Instance Attribute Summary collapse
-
#mappings ⇒ Object
: Hash[String, [Integer, WasmFunction|ExternalFunction]].
Instance Method Summary collapse
- #[](name) ⇒ Object
-
#initialize(export_section, store) ⇒ Exports
constructor
A new instance of Exports.
Constructor Details
#initialize(export_section, store) ⇒ Exports
Returns a new instance of Exports.
1297 1298 1299 1300 1301 1302 1303 |
# File 'lib/wardite.rb', line 1297 def initialize(export_section, store) @mappings = {} export_section.exports.each_pair do |name, desc| # TODO: introduce map by kind @mappings[name] = [desc.kind, store.funcs[desc.func_index]] end end |
Instance Attribute Details
#mappings ⇒ Object
: Hash[String, [Integer, WasmFunction|ExternalFunction]]
1292 1293 1294 |
# File 'lib/wardite.rb', line 1292 def mappings @mappings end |
Instance Method Details
#[](name) ⇒ Object
1307 1308 1309 |
# File 'lib/wardite.rb', line 1307 def [](name) @mappings[name] end |