akuraru/Wara

View on GitHub
coredata/Swift/_BloodPressureWrapper.swift

Summary

Maintainability
A
0 mins
Test Coverage
import Foundation

class _BloodPressureWrapper: HealthDataWrapper {
    override func entity() -> BloodPressure? {
        return _entity as BloodPressure?
    }
    var bloodPressure: NSNumber?

    init(bloodPressure: BloodPressure?) {
        super.init(healthData: bloodPressure)
        if let e = bloodPressure {
            self.bloodPressure = e.bloodPressure
        }
    }
    func updateBloodPressure(bloodPressure: BloodPressure) {
        super.updateHealthData(bloodPressure)
        bloodPressure.bloodPressure = self.bloodPressure
    }
}