----------------------------------------------- -- Mock class: <%= name %> <%= label %> ----------------------------------------------- -- created at: <%= DateTime.now.strftime("%F %T") %> local <%= super_class %> = require '<%= super_class %>' local <%= name %> = {} local <%= name %>MT = {__index = <%= name %>} -- erd_inherit: <%= super_class %> setmetatable(<%= name %>, {__index = <%= super_class %>}) function <%= name %>.new(opt) local <%= name %>Instance = opt or {} <%= name %>Instance.is_mock = true 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 %>