rename create() to new()

This commit is contained in:
Alexey Gulev
2019-03-27 22:13:45 +01:00
parent 832ebe5674
commit 87e6f6ef1f
2 changed files with 4 additions and 4 deletions

View File

@@ -29,7 +29,7 @@ end
function M.register(name, module)
-- TODO: Find better solution to creating elements?
_factory["new_" .. name] = function(factory, node_or_name, ...)
_factory.create(factory, module, node_or_name, ...)
_factory.new(factory, module, node_or_name, ...)
end
log("Register component", name)
end
@@ -86,7 +86,7 @@ local function create(module, factory, name, ...)
end
function _factory.create(factory, module, node_or_name, ...)
function _factory.new(factory, module, node_or_name, ...)
local instance = create(module, factory, node_or_name)
if instance.init then