summaryrefslogtreecommitdiff
path: root/examples/change-setting.lua
blob: bff5889b421de43fe734af6796894cc5fb7bdbfd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
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())