I seem to recall Lua has something similar to Ruby's method_missing. Or am I remembering incorrectly?
Asked
Active
Viewed 361 times
1 Answers
8
The __index
and __newindex
of a table's metatable can be used to the same effect as Ruby's method_missing
.

JoeG
- 12,994
- 1
- 38
- 63
-
Yes, upon more vigilant googling I found this URL http://www.lua.org/pil/13.4.1.html from the Lua manual which states: "when we access an absent field in a table .... such access triggers the interpreter to look for an __index metamethod" – Dexygen Oct 11 '11 at 20:50