Exporting oracles in STON and JSON.

This commit is contained in:
Offray Vladimir Luna Cárdenas 2023-12-01 11:45:13 -05:00
parent 29a8d52f0f
commit a9d376b36c

View File

@ -0,0 +1,11 @@
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