Closures
hookmetamethod
Bir value üzerinde metamethod function arar ve bu function değerini hookfunction üzerinden hook eder. First argument, raw metafield lookup tarafından kabul edilen herhangi bir value olabilir. Second argument string metamethod name olmalı ve third argument function replacement olmalıdır. raw metafield lookup named metafield bulamazsa function argument 2 için “Metamethod doesn’t exist” üretir. Metafield varsa ancak function değilse argument 2 için “Metamethod isn’t a function” üretir. Metafield function olduğunda hookmetamethod, found metamethod function değerini target olarak hookfunction çağırır ve hookfunction cloned original closure değerini döndürür.
any
gerekli
Metatable değeri raw metafield lookup ile incelenen value.
string
gerekli
raw metafield lookup içine verilen Metafield name.
function
gerekli
Found metamethod function için replacement olarak hookfunction içine verilen Function.
function
hookfunction tarafından döndürülen cloned original metamethod closure.