Type Function Object CoronaPrototype Library none Revision Release 2024.3703
Subclasses can override this method to provide custom initialization of instances.
object:initialize() |
local Prototype = require ( "CoronaPrototype" ) local MyClass = Prototype:newClass( "MyClass" ) function MyClass:initialize() -- custom init self.foo = "bar" return self end local instance = MyClass:new() print ( instance.foo ) |