Add get and set to config

This commit is contained in:
Corey Johnson & Nathan Sobo
2012-12-17 16:04:57 -08:00
parent 6183680d15
commit 6aafb73389

View File

@@ -87,6 +87,12 @@ class Config
hash = hash[key]
hash[keyPath.shift()] = value
get: (keyPathString) ->
@valueAtKeyPath(keyPathString.split("."))
set: (keyPathString, value) ->
@setValueAtKeyPath(keyPathString.split("."), value)
observe: (keyPathString, callback) ->
keyPath = keyPathString.split('.')
value = @valueAtKeyPath(keyPath)