Metatable

getrawmetatable

<table> getrawmetatable(<table> object)

Returns the metatable of object, where the __metatable field would normally lock the metatable.


hookmetamethod

<function> hookmetamethod(<table> object, <string> method, <function> hook)

Replaces func with hook internally, where hook will be invoked in place of func when called.

Returns a new function that can be used to access the original definition of func.


getnamecallmethod

<string> getnamecallmethod()

Returns the name of the method that invoked the __namecall metamethod.


setnamecallmethod

<nil> setnamecallmethod(<string> method)

Changes the name of the method that invoked __namecall metamethod.


isreadonly

Returns whether object is read-only or not.


setrawmetatable

Sets the metatable of object to metatable, where the __metatable field would normally lock the metatable.


setreadonly

Sets whether object is read-only or not.


makewriteable

Unfreezes object .


makereadonly

Freezes object , where table.freeze would normally check for __metatable.


Last updated