This commit is contained in:
Suresh, Kamlesh 2020-02-18 12:31:55 -05:00
parent 4378a6f132
commit ff0758106e

View File

@ -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)