-
-
Save videlais/e1a5a1e58b09870801241b1d438f0f0e to your computer and use it in GitHub Desktop.
person.lua
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Person = {} | |
function Person:new() | |
newObj = {name = 'Dan'} | |
self.__index = self | |
return setmetatable(newObj, self) | |
end | |
function Person:sayName() | |
print('My name is ' .. self.name) | |
end | |
newPerson = Person:new() | |
newPerson:sayName() | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment