Merge branch 'feature/parse' of https://gitlab.verizon.com/BPHV_MIPS/mvm_core_ui into feature/parse
This commit is contained in:
commit
0360258c31
@ -8,12 +8,17 @@
|
|||||||
|
|
||||||
import UIKit
|
import UIKit
|
||||||
|
|
||||||
class LabelAttributeActionModel: LabelAttributeModel {
|
open class LabelAttributeActionModel: LabelAttributeModel {
|
||||||
override public class var identifier: String {
|
override public class var identifier: String {
|
||||||
return "action"
|
return "action"
|
||||||
}
|
}
|
||||||
var action: ActionModelProtocol
|
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 {
|
required public init(from decoder: Decoder) throws {
|
||||||
let typeContainer = try decoder.container(keyedBy: CodingKeys.self)
|
let typeContainer = try decoder.container(keyedBy: CodingKeys.self)
|
||||||
action = try typeContainer.decodeModel(codingKey: .action, typeCodingKey: ActionCodingKey.actionType)
|
action = try typeContainer.decodeModel(codingKey: .action, typeCodingKey: ActionCodingKey.actionType)
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user