-
Notifications
You must be signed in to change notification settings - Fork 42
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ISSUE2 - Class properties added to generated code.
- Loading branch information
Showing
13 changed files
with
83 additions
and
84 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,7 @@ | ||
class {{getFullName}}{{#if getExtends}} extends {{#with getExtends}}{{getFullName}}{{/with}}{{/if}} | ||
{{#each getFields}} | ||
{{this.getName}}: undefined | ||
{{/each}} | ||
{{#each getMethods}} | ||
{{this.getName}}: {{#if this.getParameters}}({{#each this.getParameters}}{{#if @first}}{{else}},{{/if}}{{#if this.getName}}{{this.getName}}{{else}}param{{@index}}{{/if}}{{/each}}){{/if}} -> | ||
{{/each}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,18 @@ | ||
class Car | ||
|
||
model: undefined | ||
make: undefined | ||
year: undefined | ||
setModel: (model) -> | ||
|
||
setMake: (make) -> | ||
|
||
setYear: (param0) -> | ||
|
||
getModel: -> | ||
|
||
getMake: -> | ||
|
||
getYear: -> | ||
|
||
|
||
class Toyota extends Car | ||
|
||
|
||
class Honda extends Car | ||
|
||
|
||
class Ford extends Car | ||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
abstract class Car { | ||
private String model; | ||
private String make; | ||
private Number year; | ||
public void setModel(String model) { | ||
} | ||
public void setMake(String make) { | ||
} | ||
public void setYear(Number param0) { | ||
} | ||
public String getModel() { | ||
return null; | ||
} | ||
public String getMake() { | ||
return null; | ||
} | ||
public Number getYear() { | ||
return null; | ||
} | ||
} | ||
class Toyota : Car { | ||
} | ||
class Honda : Car { | ||
} | ||
class Ford : Car { | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,43 +1,27 @@ | ||
abstract class Car { | ||
|
||
private String model; | ||
private String make; | ||
private Number year; | ||
public void setModel(String model) { | ||
|
||
} | ||
|
||
public void setMake(String make) { | ||
|
||
} | ||
|
||
public void setYear(Number param0) { | ||
|
||
} | ||
|
||
public String getModel() { | ||
|
||
return null; | ||
|
||
} | ||
|
||
public String getMake() { | ||
|
||
return null; | ||
|
||
} | ||
|
||
public Number getYear() { | ||
|
||
return null; | ||
|
||
} | ||
|
||
} | ||
} | ||
class Toyota extends Car { | ||
|
||
} | ||
} | ||
class Honda extends Car { | ||
|
||
} | ||
} | ||
class Ford extends Car { | ||
|
||
} | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,51 +1,35 @@ | ||
<?php | ||
abstract class Car { | ||
|
||
private model; | ||
private make; | ||
private year; | ||
public function setModel($model) { | ||
|
||
} | ||
|
||
public function setMake($make) { | ||
|
||
} | ||
|
||
public function setYear($param0) { | ||
|
||
} | ||
|
||
public function getModel() { | ||
|
||
return null; | ||
|
||
} | ||
|
||
public function getMake() { | ||
|
||
return null; | ||
|
||
} | ||
|
||
public function getYear() { | ||
|
||
return null; | ||
|
||
} | ||
|
||
} | ||
?> | ||
?> | ||
<?php | ||
class Toyota extends Car { | ||
|
||
} | ||
?> | ||
?> | ||
<?php | ||
class Honda extends Car { | ||
|
||
} | ||
?> | ||
?> | ||
<?php | ||
class Ford extends Car { | ||
|
||
} | ||
?> | ||
?> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,41 +1,34 @@ | ||
class Car | ||
|
||
@model | ||
@make | ||
@year | ||
def setModel (model) | ||
return | ||
end | ||
|
||
def setMake (make) | ||
return | ||
end | ||
|
||
def setYear (param0) | ||
return | ||
end | ||
|
||
def getModel | ||
return | ||
end | ||
|
||
def getMake | ||
return | ||
end | ||
|
||
def getYear | ||
return | ||
end | ||
|
||
end | ||
|
||
|
||
class Toyota < Car | ||
|
||
end | ||
|
||
|
||
class Honda < Car | ||
|
||
end | ||
|
||
|
||
class Ford < Car | ||
|
||
end | ||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,37 +1,30 @@ | ||
class Car { | ||
|
||
private model : String; | ||
private make : String; | ||
private year : Number; | ||
setModel(model) { | ||
return; | ||
} | ||
|
||
setMake(make) { | ||
return; | ||
} | ||
|
||
setYear(param0) { | ||
return; | ||
} | ||
|
||
getModel() { | ||
return; | ||
} | ||
|
||
getMake() { | ||
return; | ||
} | ||
|
||
getYear() { | ||
return; | ||
} | ||
|
||
} | ||
} | ||
class Toyota extends Car { | ||
|
||
} | ||
} | ||
class Honda extends Car { | ||
|
||
} | ||
} | ||
class Ford extends Car { | ||
|
||
} | ||
} | ||
|