Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Doesn't Lua have something comparable to Ruby's method_missing?

I seem to recall Lua has something similar to Ruby's method_missing. Or am I remembering incorrectly?

like image 757
Dexygen Avatar asked Oct 11 '11 20:10

Dexygen


1 Answers

The __index and __newindex of a table's metatable can be used to the same effect as Ruby's method_missing.

like image 148
JoeG Avatar answered Oct 13 '22 11:10

JoeG