View SRPPass.swift
struct DataManager {
let dataLoader: DataDownloader
let dataParser: DataParser
let dbManager: DBManager
init(dataLoader: DataDownloader, dataParser: DataParser, dbManager: DBManager) {
self.dataLoader = dataLoader
self.dataParser = dataParser
self.dbManager = dbManager
View SRPFail.swift
struct DataManager {
func manage() {
let data = loadData()
let array = parseData(data)
saveData(array)
}
func loadData() -> Data {
// load data from some URL