From ff0758106ef6cde410c7f5d104acd5e2331e9d95 Mon Sep 17 00:00:00 2001 From: "Suresh, Kamlesh" Date: Tue, 18 Feb 2020 12:31:55 -0500 Subject: [PATCH] init --- .../Atoms/Views/Label/LabelAttributeActionModel.swift | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/MVMCoreUI/Atoms/Views/Label/LabelAttributeActionModel.swift b/MVMCoreUI/Atoms/Views/Label/LabelAttributeActionModel.swift index 2ebcb4b4..135fee45 100644 --- a/MVMCoreUI/Atoms/Views/Label/LabelAttributeActionModel.swift +++ b/MVMCoreUI/Atoms/Views/Label/LabelAttributeActionModel.swift @@ -8,12 +8,17 @@ import UIKit -class LabelAttributeActionModel: LabelAttributeModel { +open class LabelAttributeActionModel: LabelAttributeModel { override public class var identifier: String { return "action" } var action: ActionModelProtocol + public init(_ location: Int, _ length: Int, action: ActionModelProtocol) { + self.action = action + super.init(Self.identifier, location, length) + } + required public init(from decoder: Decoder) throws { let typeContainer = try decoder.container(keyedBy: CodingKeys.self) action = try typeContainer.decodeModel(codingKey: .action, typeCodingKey: ActionCodingKey.actionType)