Refactoring.

This commit is contained in:
Diego Ruidajo 2021-09-15 19:37:57 -05:00
parent 0d0f17bdb7
commit 73d501615d

View File

@ -18,14 +18,18 @@ Class {
{ #category : 'accessing' }
TiddlyWiki >> addToConfigFile [
| configDict cleaned |
configDict := STONJSON fromString: self configFile contents.
| cleaned |
cleaned := self copy.
cleaned tiddlers: nil.
configDict
self configDictonary
at: cleaned name put: cleaned;
yourself.
MarkupFile exportAsFileOn: self configFile containing:(STON toStringPretty: configDict)
MarkupFile exportAsFileOn: self configFile containing:(STON toStringPretty: self configDictonary)
]
{ #category : 'accessing' }
TiddlyWiki >> configDictonary [
^ STONJSON fromString: self configFile contents.
]
{ #category : 'accessing' }
@ -79,6 +83,12 @@ TiddlyWiki >> importJSONFile [
])
]
{ #category : 'accessing' }
TiddlyWiki >> loadFromConfig: wikiname [
self configDictonary
]
{ #category : 'accessing' }
TiddlyWiki >> local [
^ self file