mirror of
https://github.com/atom/atom.git
synced 2026-02-10 22:55:09 -05:00
Add get and set to config
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user