Skip to content

Commit 3fc99d1

Browse files
committed
#3 fixed variable names to start with lowercase.
1 parent 0ad74b4 commit 3fc99d1

File tree

1 file changed

+9
-6
lines changed

1 file changed

+9
-6
lines changed

SwiftyJSONAccelerator/SJModelGenerator.swift

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -62,14 +62,14 @@ public class ModelGenerator {
6262

6363
//MARK: Public Methods
6464
/**
65-
Initalize the model generator with various settings.
65+
Initalize the model generator with various settings.
6666

67-
- parameter baseContent: Base JSON that has to be converted into model.
68-
- parameter baseClassName: Name of the base class.
69-
- parameter filePath: Filepath where the generated model has to be saved.
67+
- parameter baseContent: Base JSON that has to be converted into model.
68+
- parameter baseClassName: Name of the base class.
69+
- parameter filePath: Filepath where the generated model has to be saved.
7070

71-
- returns: A ModelGenerator instance.
72-
*/
71+
- returns: A ModelGenerator instance.
72+
*/
7373
init(baseContent: JSON, baseClassName: String, filePath: String) {
7474
self.baseContent = baseContent
7575
self.filePath = filePath
@@ -326,7 +326,10 @@ public class ModelGenerator {
326326
var component: String = element
327327
if index != 0 {
328328
component.replaceRange(component.startIndex...component.startIndex, with: String(component[component.startIndex]).uppercaseString)
329+
} else {
330+
component.replaceRange(component.startIndex...component.startIndex, with: String(component[component.startIndex]).lowercaseString)
329331
}
332+
330333
finalVariableName.appendContentsOf(component)
331334
}
332335
return finalVariableName

0 commit comments

Comments
 (0)