structure for HabitModel.save()

This commit is contained in:
2022-02-03 20:35:07 -07:00
parent c8e043b726
commit e1416e5c7a

View File

@@ -54,7 +54,15 @@
points (count (l.split "") ->c (= c "|")))))))
(otherwise (break))))))
(function :String stringify [:Entry e]
"")
(method :Void save []
(localVar &mut content "DAILY\n-----\n")
(+= content (.join (map dailyEntries stringify) "\n") "\n")
(+= content "BONUS\n-----\n")
(+= content (.join (map bonusEntries stringify) "\n") "\n")
(+= content "TODO\n-----\n")
(+= content (.join (map todoEntries stringify) "\n") "\n")
(File.saveContent textFile
// TODO stringify the entries
""))
content))