Documentation experiments

This commit is contained in:
Insality
2020-02-23 22:57:44 +03:00
parent 5c576e6059
commit 822db35e84
25 changed files with 1071 additions and 1057 deletions

View File

@@ -9,26 +9,6 @@ local class = require("druid.system.middleclass")
local Component = class("druid.component")
--- Setup component context and his style table
-- @function component:setup_component
-- @tparam context table Druid context. Usually it is self of script
-- @tparam style table Druid style module
-- @treturn Component Component itself
function Component.setup_component(self, context, style)
self._meta = {
template = nil,
context = nil,
nodes = nil,
style = nil,
}
self:set_context(context)
self:set_style(style)
return self
end
--- Get current component style table
-- @function component:get_style
-- @treturn table Component style table
@@ -136,6 +116,26 @@ function Component.get_druid(self)
end
--- Setup component context and his style table
-- @function component:setup_component
-- @tparam context table Druid context. Usually it is self of script
-- @tparam style table Druid style module
-- @treturn Component Component itself
function Component.setup_component(self, context, style)
self._meta = {
template = nil,
context = nil,
nodes = nil,
style = nil,
}
self:set_context(context)
self:set_style(style)
return self
end
--- Basic constructor of component. It will call automaticaly
-- by `Component.static.create`
-- @function component:initialize