Noobish1/WeatherRules

View on GitHub
App/ExtensionCore/WhatToWearExtensionCore/ViewModels/StaticHeightRuleVM.swift

Summary

Maintainability
A
0 mins
Test Coverage
import UIKit
import WhatToWearCoreComponents
import WhatToWearCoreUI

internal struct StaticHeightRuleVM {
    // MARK: properties
    internal let innerViewModel: RuleSectionViewModel
    internal let cellHeight: CGFloat

    // MARK: init
    internal init(viewModel: RuleSectionViewModel, prototypeCell: RuleSectionTableViewCell, width: CGFloat) {
        prototypeCell.configure(with: viewModel)

        self.innerViewModel = viewModel
        self.cellHeight = prototypeCell.heightForConstrainedWidth(width)
    }
}