From a9d376b36cbfd15eb0f6ae0c383197a68de2ec13 Mon Sep 17 00:00:00 2001 From: Offray Luna Date: Fri, 1 Dec 2023 11:45:13 -0500 Subject: [PATCH] Exporting oracles in STON and JSON. --- .../Firelights.class/instance/saveOracles.st | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 RoloLudo.package/Firelights.class/instance/saveOracles.st diff --git a/RoloLudo.package/Firelights.class/instance/saveOracles.st b/RoloLudo.package/Firelights.class/instance/saveOracles.st new file mode 100644 index 0000000..caa4167 --- /dev/null +++ b/RoloLudo.package/Firelights.class/instance/saveOracles.st @@ -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 \ No newline at end of file