-
Notifications
You must be signed in to change notification settings - Fork 53
Library functions
Roland edited this page Sep 27, 2016
·
1 revision
30log provides a set of built-in functions to inspect relationships between classes and instances.
This library function returns true when the given argument is a class.
local aClass = class()
local aTable = {}
print(class.isClass(aClass)) -- outputs true
print(class.isClass(aTable)) -- outputs false
This library function returns true when the given argument is an instance from any class.
local aClass = class()
local instance = aClass()
local sometable = {}
print(class.isInstance(instance)) -- outputs true
print(class.isInstance(sometable)) -- outputs false