Cross-referencing objects¶
- :lua:obj:¶
- :lua:lua:¶
You can reference any documented object through the
lua:obj
role.Given an object path, Lua domain will first search for an object with this path in the outer-most class, then in the current module, and finally in the global namespace.
So, if you reference an object
Sound.id
from documentation of a classSoundBoard.Helper
located in the modulesoundboard
, Lua domain will first checksoundboard.SoundBoard.Helper.Sound.id
, thensoundboard.Sound.id
, and finallySound.id
.If you specify a fully qualified object name, and would like to hide its prefix, you can add a tilde (
~
) to the object’s path:Reference to a :lua:obj:`~logging.Logger`.
Reference to a {lua:obj}`~logging.Logger`.
Example output
Reference to a
Logger
.
- :lua:func:¶
- :lua:data:¶
- :lua:const:¶
- :lua:class:¶
- :lua:alias:¶
- :lua:enum:¶
- :lua:meth:¶
- :lua:attr:¶
- :lua:mod:¶
These are additional roles that you can use to reference a Lua object.
Lua domain does not allow having multiple objects with the same full name. Thus, all of these roles work exactly the same as
lua:obj
. The only difference is that they will warn you if the type of the referenced object doesn’t match the role’s type.