Module corky.lists

Define lists in the configuration.

Loading the module:

#: include, corky.lists

Adding a list:

#: list, <name>[, <item>[, <item> […]]]

Name must be a non-empty string identifying the list. Items may be arbitrary values, empty lists are allowed.

Info:

  • Copyright: © 2015-2017 Stefan Göbel
  • Release: 2017033001
  • License: GPLv3
  • Author: Stefan Göbel [⌂] [✉]

Functions

get (name) Get a list.
set (name, ...) Add an entry to the cache, or replace an existing entry.

Local Functions

config_handler (setting) Configuration handler for list settings.

Local Tables

lists Stores the lists.


Functions

get (name) line 56
Get a list.

Parameters:

  • name string The name of the list.

Returns:

  1. table The list, or nil if it doesn't exist.
set (name, ...) line 72
Add an entry to the cache, or replace an existing entry.

Note: The array will be created using table.pack(), so it will include the key n.

Parameters:

  • name string The name of the list.
  • ... The list elements.

Local Functions

config_handler (setting) line 90
Configuration handler for list settings.

This handler will be called automatically for every list directive in the configuration file.

Parameters:

  • setting table Array containing the configuration directive split into its individual parts.

Returns:

  1. bool If successful true, false in case of any error.

See also:

Local Tables

lists line 44
Stores the lists.

The keys in the table are the list names. The values are the lists (tables, as arrays).

generated by LDoc 1.4.6 Last updated 2019-02-14 20:51:07