class Wren::UserData
- Wren::UserData
- Reference
- Object
Defined in:
wren/user_data.crInstance Method Summary
- #call_handles : Hash(String, Pointer(LibWren::Handle))
- #call_handles=(call_handles : Hash(String, Pointer(LibWren::Handle)))
- #class_bindings : Hash(String, Pointer(LibWren::Vm) -> Nil)
- #class_bindings=(class_bindings : Hash(String, Pointer(LibWren::Vm) -> _))
- #class_sig(mod, klass) : String
- #loaded_modules : Hash(String, String)
- #method_bindings : Hash(String, Pointer(LibWren::Vm) -> Nil)
- #method_bindings=(method_bindings : Hash(String, Pointer(LibWren::Vm) -> _))
- #method_sig(mod, klass, static, signature) : String
-
#module_dirs : Array(String)
Default module dirs are the current directory and the
./wren_modules
folder at the root of this repo. - #slot_handles : Hash(String, Pointer(LibWren::Handle))
- #slot_handles=(slot_handles : Hash(String, Pointer(LibWren::Handle)))
- #vm : WeakRef(Wren::VM) | Nil
- #vm=(vm : WeakRef(Wren::VM) | Nil)
Instance Method Detail
def module_dirs : Array(String)
#
Default module dirs are the current directory and the ./wren_modules
folder at the root of this repo.
Additional module dirs to search through can be added with:
vm = Wren::VM.new
vm.config.user_data.module_dirs << "path/to/new/module/dir"
# or
vm.config.user_data.module_dirs << Path["path", "to", "new", "module", "dir"].to_s