----------------------------------------------- -- class: <%= name %> <%= label %> ----------------------------------------------- -- created at: <%= DateTime.now.strftime("%F %T") %> local <%= name %> = {} local <%= name %>MT = {__index = <%= name %>} function <%= name %>.new(opt) local <%= name %>Instance = opt or {} assert(type(<%= name %>Instance) == 'table', 'the parameter passed to new() must be a table.') setmetatable(<%= name %>Instance, <%= name %>MT) return <%= name %>Instance end return <%= name %>