Sha256: dce4a77f696a41ebb1a17de06fcdc9d81545f4809723c1bd04ca8d5adb2425d1
Contents?: true
Size: 743 Bytes
Versions: 1
Compression:
Stored size: 743 Bytes
Contents
----------------------------------------------- -- 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 %>
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
cbt-0.0.1 | templates/Class_with_super.mock.lua.erb |