Skip to content

Commit

Permalink
Update SwiftYYModelBuilder
Browse files Browse the repository at this point in the history
  • Loading branch information
mlch911 committed Jun 12, 2023
1 parent 7f6ecc7 commit 2c0c56e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions JSONConverter/Classes/Builder/SwiftYYModelBuilder.swift
Original file line number Diff line number Diff line change
Expand Up @@ -60,9 +60,9 @@ class SwiftYYModelBuilder: BuilderProtocol {
guard structType == .class else { fatalError() }
if let propertiesInitText = propertiesInitText, !propertiesInitText.isEmpty {
let tempPropertiesInitText = StringUtils.removeLastChar(StringUtils.removeLastChar(propertiesInitText))
return "\nclass \(clsName)\(parentClsName) {\n\(propertiesText)\n\tstatic func modelContainerPropertyGenericClass() -> [String : Any]? {\n\t\t[\(tempPropertiesInitText)]\n\t}\n}\n"
return "\n@objcMembers\nclass \(clsName)\(parentClsName) {\n\(propertiesText)\n\tstatic func modelContainerPropertyGenericClass() -> [String : Any]? {\n\t\t[\(tempPropertiesInitText)]\n\t}\n}\n"
}
return "\nclass \(clsName)\(parentClsName) {\n\(tempPropertiesText)\n}\n"
return "\n@objcMembers\nclass \(clsName)\(parentClsName) {\n\(tempPropertiesText)\n}\n"
}

func fileSuffix() -> String {
Expand Down

0 comments on commit 2c0c56e

Please sign in to comment.