summaryrefslogtreecommitdiff
path: root/examples/change-setting.lua
diff options
context:
space:
mode:
Diffstat (limited to 'examples/change-setting.lua')
-rw-r--r--examples/change-setting.lua24
1 files changed, 24 insertions, 0 deletions
diff --git a/examples/change-setting.lua b/examples/change-setting.lua
new file mode 100644
index 0000000..bff5889
--- /dev/null
+++ b/examples/change-setting.lua
@@ -0,0 +1,24 @@
+-- examples/change-setting.lua
+--
+-- Demonstration of changing a setting in Clod
+--
+-- Copyright 2012 Daniel Silverstone <dsilvers@digital-scurf.org>
+--
+
+clod = require "clod"
+
+local input_config = [[
+project.name "jeff"
+project.head "refs/heads/jeff"
+
+other.thing "here"
+]]
+
+conf = clod.parse(input_config)
+
+conf.settings.project.name = "Clod"
+conf.settings.project.head = "refs/heads/jeff"
+conf.settings.project.description = "Demonstration of settings"
+
+print(conf:serialise())
+