-
Notifications
You must be signed in to change notification settings - Fork 0
Glu
Get a glass by name.
Parameters
-
glass_name
(string
) - The name of the glass to retrieve.
Returns
Glass?
- The glass, or nil if it does not exist.
Examples
local glass = Glu.get_glass("MyGlass")
Get all glass names.
Returns
string[]
- A table of glass names.
Examples
local glass_names = Glu.get_glass_names()
Get all glasses.
Returns
Glass[]
- A table of glasses.
Examples
local glasses = Glu.get_glasses()
Get the last traceback line. Used for validation functions, or any
time you need to get the last line of a traceback. Also available
via the v
table from the anchor.
Returns
string
- The last traceback line.
Check if a glass exists.
Parameters
-
glass_name
(string
) - The name of the glass to check for.
Returns
boolean
- True if the glass exists, false otherwise.
Examples
local exists = Glu.has_glass("MyGlass")
Generate a unique identifier, producing a version 4 UUID.
Returns
string
- A unique identifier.
Examples
local id = Glu.id()
Instantiate a new Glu instance. Can be invoked by its class name or
by the new
function.
Parameters
-
package_name
(string
) - The name of the package to which this module belongs. -
module_dir_name
(string?
) - The directory name inside the package directory where the modules are located.
Returns
Glu
- A new Glu instance.
Examples
local glu = Glu.new("MyPackage", "MyModule")
local glu = Glu("MyPackage", "MyModule")
Documentation generated with Gludoc.