TokiTrainer/Toki Trainer/ViewModels/FlashCardLessonsViewModel.swift
2021-11-08 12:24:46 -05:00

23 lines
413 B
Swift

//
// FlashCardLessonsViewModel.swift
// Toki Trainer
//
// Created by Avery Ada Pace on 11/8/21.
//
import Foundation
class FlashCardLessonsViewModel: ObservableObject {
let jsonLoader: TokiJSONLoader = TokiJSONLoader()
@Published var lessons: [TokiLesson] = []
init() {
if let safeLessons = jsonLoader.loadLessons() {
lessons = safeLessons
}
}
}