Skip to content

Instantly share code, notes, and snippets.

View Natix1's full-sized avatar

Natix Natix1

  • 23:02 (UTC +02:00)
View GitHub Profile

A metatable can be defined like

local t = setmetatable({}, {
  __tostring = function() return 'custom tostring behavior!' end
})

Here are the metamethods that you can define, and their behavior

Operators