diff options
author | Daniel Silverstone <dsilvers@digital-scurf.org> | 2012-08-23 21:53:46 +0100 |
---|---|---|
committer | Daniel Silverstone <dsilvers@digital-scurf.org> | 2012-08-23 21:53:46 +0100 |
commit | c85355947228b02d1e353c29530b185967ea86fe (patch) | |
tree | d0cf76c23ef1c72c6dcb05be1419d9de6a1cf1f8 /examples | |
parent | c95414f012dfeb2a87090866c68a61e08b87c0f0 (diff) | |
download | clod-c85355947228b02d1e353c29530b185967ea86fe.tar.gz |
EXAMPLE: Demonstrate additions to settings
Diffstat (limited to 'examples')
-rw-r--r-- | examples/change-setting.lua | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/examples/change-setting.lua b/examples/change-setting.lua index 1c26545..13914d1 100644 --- a/examples/change-setting.lua +++ b/examples/change-setting.lua @@ -27,6 +27,12 @@ conf.settings.project.head = "refs/heads/master" conf.settings.project.description = "Demonstration of settings" -- Remove other.thing (will also elide trailing blank line) conf.settings.other.thing = nil +-- And add a new setting which will add a blank line. +-- Note, that we cannot use conf.settings.person.name here because +-- the '.person.' will return nil as there is no such prefix. +conf.settings["person.name"] = "Lars" +-- Although now we can do this: +conf.settings.person.age = 42 io.stdout:write(conf:serialise()) |