Skip to content

Commit

Permalink
Improve class.lua documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
Firanel committed Dec 30, 2022
1 parent cf39d56 commit 27676c3
Show file tree
Hide file tree
Showing 7 changed files with 17 additions and 26 deletions.
2 changes: 1 addition & 1 deletion docs/classes/Color.html
Original file line number Diff line number Diff line change
Expand Up @@ -1422,7 +1422,7 @@ <h3>Usage:</h3>
</div> <!-- id="main" -->
<div id="about">
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc 1.4.6</a></i>
<i style="float:right;">Last updated 2022-06-08 20:37:27 </i>
<i style="float:right;">Last updated 2022-12-30 15:01:58 </i>
</div> <!-- id="about" -->
</div> <!-- id="container" -->
</body>
Expand Down
2 changes: 1 addition & 1 deletion docs/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ <h2>Topics</h2>
</div> <!-- id="main" -->
<div id="about">
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc 1.4.6</a></i>
<i style="float:right;">Last updated 2022-06-08 20:37:27 </i>
<i style="float:right;">Last updated 2022-12-30 15:01:58 </i>
</div> <!-- id="about" -->
</div> <!-- id="container" -->
</body>
Expand Down
2 changes: 1 addition & 1 deletion docs/modules/lua-color.colors.X11.html
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ <h3>Usage:</h3>
</div> <!-- id="main" -->
<div id="about">
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc 1.4.6</a></i>
<i style="float:right;">Last updated 2022-06-08 20:37:27 </i>
<i style="float:right;">Last updated 2022-12-30 15:01:58 </i>
</div> <!-- id="about" -->
</div> <!-- id="container" -->
</body>
Expand Down
2 changes: 1 addition & 1 deletion docs/modules/lua-color.colors.html
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ <h3>Usage:</h3>
</div> <!-- id="main" -->
<div id="about">
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc 1.4.6</a></i>
<i style="float:right;">Last updated 2022-06-08 20:37:27 </i>
<i style="float:right;">Last updated 2022-12-30 15:01:58 </i>
</div> <!-- id="about" -->
</div> <!-- id="container" -->
</body>
Expand Down
2 changes: 1 addition & 1 deletion docs/modules/lua-color.terminal.html
Original file line number Diff line number Diff line change
Expand Up @@ -260,7 +260,7 @@ <h2 class="section-header "><a name="Fields"></a>Fields</h2>
</div> <!-- id="main" -->
<div id="about">
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc 1.4.6</a></i>
<i style="float:right;">Last updated 2022-06-08 20:37:27 </i>
<i style="float:right;">Last updated 2022-12-30 15:01:58 </i>
</div> <!-- id="about" -->
</div> <!-- id="container" -->
</body>
Expand Down
4 changes: 2 additions & 2 deletions docs/topics/README.md.html
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ <h2>Features</h2>
<h2>Install</h2>

<p>Use <code>luarocks install lua-color</code> or add folder to your project root. <br/>
Supports lua >= 5.3.</p>
Supports lua >= 5.1.</p>

<p><a name="Documentation"></a></p>
<h2>Documentation</h2>
Expand Down Expand Up @@ -269,7 +269,7 @@ <h3>Terminal colors</h3>
</div> <!-- id="main" -->
<div id="about">
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc 1.4.6</a></i>
<i style="float:right;">Last updated 2022-06-08 20:37:27 </i>
<i style="float:right;">Last updated 2022-12-30 15:01:58 </i>
</div> <!-- id="about" -->
</div> <!-- id="container" -->
</body>
Expand Down
29 changes: 10 additions & 19 deletions util/class.lua
Original file line number Diff line number Diff line change
@@ -1,23 +1,14 @@
--
--------------------------------------------------------------------------------
-- File: class.lua
--
-- Usage: ./class.lua
--
-- Description:
--
-- Options: ---
-- Requirements: ---
-- Bugs: ---
-- Notes: ---
-- Author: YOUR NAME (), <>
-- Organization:
-- Version: 1.0
-- Created: 15.04.2021
-- Revision: ---
--------------------------------------------------------------------------------
--
-- Code based on:
-- http://lua-users.org/wiki/SimpleLuaClasses

--- Helper function to create classes
--
-- @usage local Color = class(function () --[[ constructor ]] end)
-- @usage local Color2 = class(
-- Color,
-- function () --[[ constructor ]] end,
-- { prop_a = "some value" }
-- )
local function class(base, init, defaults)
local c = defaults or {} -- a new class instance
if not init and type(base) == 'function' then
Expand Down

0 comments on commit 27676c3

Please sign in to comment.