RoloLudo/RoloLudo.package/Firelights.class/instance/saveOracles.st

11 lines
323 B
Smalltalk

accessing
saveOracles
| fileName formats |
fileName := 'oracles'.
formats := {'ston' -> STON. 'json' -> STONJSON} asDictionary.
formats keysAndValuesDo: [:format :class |
MarkupFile
exportAsFileOn: (FileLocator temp / fileName), format
containing: (class toStringPretty: self oracles)
].
^ FileLocator temp