Exporting oracles in STON and JSON.
This commit is contained in:
parent
29a8d52f0f
commit
a9d376b36c
11
RoloLudo.package/Firelights.class/instance/saveOracles.st
Normal file
11
RoloLudo.package/Firelights.class/instance/saveOracles.st
Normal 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
|
Loading…
Reference in New Issue
Block a user