settings.delete fn

This commit is contained in:
Paul Liverman III 2018-03-07 23:23:50 -08:00
parent b5350afe53
commit 821a83c129

View File

@ -64,6 +64,15 @@ settings = {
cache[setting.name] = setting
settings[setting.name] = totype setting.value
return settings
delete: (name) ->
setting = cache[name]
unless setting
setting = Settings\find :name
if setting
setting\delete!
cache[name] = nil
settings[name] = nil
}
return setmetatable settings, {