Config

Util.Config

function Config:New(name)
function Config:Read(key, default)
function Config:Write(key, value)

local Tinkr = ...
local Config = Tinkr.Util.Config
 
local my_config = Config:New('my_config')
 
my_config:Write('foo', 'something')
my_config:Write('bar', 'awesome')
 
local foo = my_config:Read('foo', 'default value')
local baz = my_config:Read('baz', 'default value')
 
print(foo) -- something
print(baz) -- default value