@@ -212,32 +212,26 @@ public class ModelGenerator {
212
212
content = content. stringByReplacingOccurrencesOfString ( " {STRING_CONSTANT_BLOCK} " , withString: stringConstants)
213
213
content = content. stringByReplacingOccurrencesOfString ( " {PROPERTIES} " , withString: declarations)
214
214
215
- if self . supportNSCoding
216
- {
217
- if let nscodingBase = try ? String ( contentsOfFile: NSBundle . mainBundle ( ) . pathForResource ( " NSCodingTemplate " , ofType: " txt " ) !)
218
- {
215
+ if self . supportNSCoding {
216
+ if let nscodingBase = try ? String ( contentsOfFile: NSBundle . mainBundle ( ) . pathForResource ( " NSCodingTemplate " , ofType: " txt " ) !) {
219
217
content = content. stringByReplacingOccurrencesOfString ( " {NSCODING_PROTOCOL_SUPPORT} " , withString: " , NSCoding " )
220
218
content = content. stringByReplacingOccurrencesOfString ( " {NSCODING_SUPPORT} " , withString: nscodingBase)
221
219
222
220
content = content. stringByReplacingOccurrencesOfString ( " {ENCODERS} " , withString: encoders)
223
221
content = content. stringByReplacingOccurrencesOfString ( " {DECODERS} " , withString: decoders)
224
222
}
225
- else
226
- {
223
+ else {
227
224
content = content. stringByReplacingOccurrencesOfString ( " {NSCODING_PROTOCOL_SUPPORT} " , withString: " " )
228
225
content = content. stringByReplacingOccurrencesOfString ( " {NSCODING_SUPPORT} " , withString: " " )
229
226
}
230
227
}
231
- else
232
- {
228
+ else {
233
229
content = content. stringByReplacingOccurrencesOfString ( " {NSCODING_PROTOCOL_SUPPORT} " , withString: " " )
234
230
content = content. stringByReplacingOccurrencesOfString ( " {NSCODING_SUPPORT} " , withString: " " )
235
231
}
236
232
237
- if self . supportSwiftyJSON
238
- {
239
- if let swiftyBase = try ? String ( contentsOfFile: NSBundle . mainBundle ( ) . pathForResource ( " SwiftyJSONTemplate " , ofType: " txt " ) !)
240
- {
233
+ if self . supportSwiftyJSON {
234
+ if let swiftyBase = try ? String ( contentsOfFile: NSBundle . mainBundle ( ) . pathForResource ( " SwiftyJSONTemplate " , ofType: " txt " ) !) {
241
235
content = content. stringByReplacingOccurrencesOfString ( " {SWIFTY_JSON_SUPPORT} " , withString: swiftyBase)
242
236
243
237
content = content. stringByReplacingOccurrencesOfString ( " {INITALIZER} " , withString: initalizers)
@@ -248,22 +242,18 @@ public class ModelGenerator {
248
242
content = content. stringByReplacingOccurrencesOfString ( " {INCLUDE_SWIFTY} " , withString: " " )
249
243
}
250
244
}
251
- else
252
- {
245
+ else {
253
246
content = content. stringByReplacingOccurrencesOfString ( " {SWIFTY_JSON_SUPPORT} " , withString: " " )
254
247
content = content. stringByReplacingOccurrencesOfString ( " {INCLUDE_SWIFTY} " , withString: " " )
255
248
}
256
249
}
257
- else
258
- {
250
+ else {
259
251
content = content. stringByReplacingOccurrencesOfString ( " {SWIFTY_JSON_SUPPORT} " , withString: " " )
260
252
content = content. stringByReplacingOccurrencesOfString ( " {INCLUDE_SWIFTY} " , withString: " " )
261
253
}
262
254
263
- if self . supportObjectMapper
264
- {
265
- if let objectMapperBase = try ? String ( contentsOfFile: NSBundle . mainBundle ( ) . pathForResource ( " ObjectMapperTemplate " , ofType: " txt " ) !)
266
- {
255
+ if self . supportObjectMapper {
256
+ if let objectMapperBase = try ? String ( contentsOfFile: NSBundle . mainBundle ( ) . pathForResource ( " ObjectMapperTemplate " , ofType: " txt " ) !) {
267
257
content = content. stringByReplacingOccurrencesOfString ( " {OBJECT_MAPPER_SUPPORT} " , withString: objectMapperBase)
268
258
269
259
content = content. stringByReplacingOccurrencesOfString ( " {OBJECT_MAPPER_INITIALIZER} " , withString: objectMapperMappings)
@@ -276,8 +266,7 @@ public class ModelGenerator {
276
266
content = content. stringByReplacingOccurrencesOfString ( " {INCLUDE_OBJECT_MAPPER} " , withString: " " )
277
267
}
278
268
}
279
- else
280
- {
269
+ else {
281
270
content = content. stringByReplacingOccurrencesOfString ( " {OBJECT_MAPPER_SUPPORT} " , withString: " " )
282
271
content = content. stringByReplacingOccurrencesOfString ( " {INCLUDE_OBJECT_MAPPER} " , withString: " " )
283
272
}
0 commit comments