Skip to content

Commit 871760a

Browse files
Added documentation for the contact book.
1 parent ce737b2 commit 871760a

7 files changed

+27
-37
lines changed

Lieutenant-ContactBook/LtAddContactCommand.class.st

Lines changed: 3 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
1+
"
2+
I am a command allowing to add a contact.
3+
"
14
Class {
25
#name : #LtAddContactCommand,
36
#superclass : #LtContactBookCommand,
4-
#instVars : [
5-
'contactName',
6-
'contactPhone'
7-
],
87
#category : #'Lieutenant-ContactBook-Commands'
98
}
109

@@ -18,26 +17,6 @@ LtAddContactCommand >> asSpecCommand [
1817
yourself
1918
]
2019

21-
{ #category : #accessing }
22-
LtAddContactCommand >> contactName [
23-
^ contactName
24-
]
25-
26-
{ #category : #accessing }
27-
LtAddContactCommand >> contactName: anObject [
28-
contactName := anObject
29-
]
30-
31-
{ #category : #accessing }
32-
LtAddContactCommand >> contactPhone [
33-
^ contactPhone
34-
]
35-
36-
{ #category : #accessing }
37-
LtAddContactCommand >> contactPhone: anObject [
38-
contactPhone := anObject
39-
]
40-
4120
{ #category : #hooks }
4221
LtAddContactCommand >> execute [
4322
"One should never manipulate UI directly from a commande.

Lieutenant-ContactBook/LtContact.class.st

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
"
2+
I model a contact, I have a name and a phone.
3+
"
14
Class {
25
#name : #LtContact,
36
#superclass : #Object,

Lieutenant-ContactBook/LtContactBook.class.st

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
"
2+
I am a contact book. I hold a list of contacts.
3+
"
14
Class {
25
#name : #LtContactBook,
36
#superclass : #Object,

Lieutenant-ContactBook/LtContactBookCommand.class.st

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
"
2+
I am an abstract command for the contact book example.
3+
4+
I define methods to access information in my #context more easily.
5+
"
16
Class {
27
#name : #LtContactBookCommand,
38
#superclass : #LtCommand,

Lieutenant-ContactBook/LtContactBookPresenter.class.st

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,10 @@
1+
"
2+
I am a presenter for a contact book.
3+
4+
I provide a nice UI to manage the contacts of the contact book I am opened on.
5+
6+
Check my class-side for example.
7+
"
18
Class {
29
#name : #LtContactBookPresenter,
310
#superclass : #ComposablePresenter,

Lieutenant-ContactBook/LtRemoveContactCommand.class.st

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
"
2+
I am a command allowing to remove a contact.
3+
"
14
Class {
25
#name : #LtRemoveContactCommand,
36
#superclass : #LtContactBookCommand,

Lieutenant-ContactBook/LtRenameContactCommand.class.st

Lines changed: 3 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1+
"
2+
I am a command allowing to rename a contact.
3+
"
14
Class {
25
#name : #LtRenameContactCommand,
36
#superclass : #LtContactBookCommand,
4-
#instVars : [
5-
'newName'
6-
],
77
#category : #'Lieutenant-ContactBook-Commands'
88
}
99

@@ -35,13 +35,3 @@ LtRenameContactCommand >> initialize [
3535
basicName: 'Rename'; "This is the name of the command that will be shown to user."
3636
basicDescription: 'Rename the selected contact.'. "This is the description of the command that will be shown to user."
3737
]
38-
39-
{ #category : #accessing }
40-
LtRenameContactCommand >> newName [
41-
^ newName
42-
]
43-
44-
{ #category : #accessing }
45-
LtRenameContactCommand >> newName: anObject [
46-
newName := anObject
47-
]

0 commit comments

Comments
 (0)