1119 Support method return types

Small refactor to split out logic for determining method display text and style. Updated documentation
Used regex to parse method statements in class diagrams to extract discrete elements to set display appropriately. Added tests and updated docs
This commit is contained in:
Justin Greywolf
2020-01-06 16:21:11 -08:00
parent 0af5e0b795
commit 58fbfc3c38
4 changed files with 68 additions and 16 deletions

View File

@@ -115,7 +115,7 @@ There are two ways to define the members of a class, and regardless of whichever
class BankAccount
BankAccount : +String owner
BankAccount : +BigDecimal balance
BankAccount : +deposit(amount) [bool]
BankAccount : +deposit(amount) bool
BankAccount : +withdrawal(amount)
```
``` mermaid
@@ -132,7 +132,7 @@ There are two ways to define the members of a class, and regardless of whichever
class BankAccount{
+String owner
+BigDecimal balance
+deposit(amount) [bool]
+deposit(amount) bool
+withdrawl(amount)
}
```
@@ -147,6 +147,9 @@ class BankAccount{
```
#### Return Type
Optionally you can end the method/function definition with the data type that will be returned
#### Visibility
To specify the visibility of a class member (i.e. any attribute or method), these notations may be placed before the member's name, but it is optional: