all: intial code import
This commit is contained in:
17
ContactBook.package/Contact.class/README.md
Normal file
17
ContactBook.package/Contact.class/README.md
Normal file
@@ -0,0 +1,17 @@
|
||||
I represent a contact.
|
||||
|
||||
I know about my name and email.
|
||||
|
||||
Collaborators:
|
||||
- Veit Heller <veit@veitheller.de
|
||||
|
||||
Public API and Key Messages
|
||||
|
||||
- there are accessors for both fullname and email.
|
||||
- you can create new instances using the newNamed:email: message.
|
||||
|
||||
Internal Representation and Key Implementation Points.
|
||||
|
||||
Instance Variables
|
||||
email: a String
|
||||
fullname: a String
|
@@ -0,0 +1,6 @@
|
||||
instance creation
|
||||
newNamed: aNameString email: anEmailString
|
||||
^ self new
|
||||
fullname: aNameString;
|
||||
email: anEmailString;
|
||||
yourself
|
3
ContactBook.package/Contact.class/instance/email..st
Normal file
3
ContactBook.package/Contact.class/instance/email..st
Normal file
@@ -0,0 +1,3 @@
|
||||
accessing
|
||||
email: aString
|
||||
email := aString
|
3
ContactBook.package/Contact.class/instance/email.st
Normal file
3
ContactBook.package/Contact.class/instance/email.st
Normal file
@@ -0,0 +1,3 @@
|
||||
accessing
|
||||
email
|
||||
^ email
|
3
ContactBook.package/Contact.class/instance/fullname..st
Normal file
3
ContactBook.package/Contact.class/instance/fullname..st
Normal file
@@ -0,0 +1,3 @@
|
||||
accessing
|
||||
fullname: aString
|
||||
fullname := aString trimBoth
|
3
ContactBook.package/Contact.class/instance/fullname.st
Normal file
3
ContactBook.package/Contact.class/instance/fullname.st
Normal file
@@ -0,0 +1,3 @@
|
||||
accessing
|
||||
fullname
|
||||
^ fullname
|
@@ -0,0 +1,3 @@
|
||||
accessing
|
||||
gravatarUrl
|
||||
^ 'http://www.gravatar.com/avatar/', (MD5 hashMessage: email trimBoth asLowercase) hex, '.jpg'
|
7
ContactBook.package/Contact.class/instance/printOn..st
Normal file
7
ContactBook.package/Contact.class/instance/printOn..st
Normal file
@@ -0,0 +1,7 @@
|
||||
printing
|
||||
printOn: aStream
|
||||
aStream
|
||||
nextPutAll: self fullname;
|
||||
nextPutAll: ' <';
|
||||
nextPutAll: self email;
|
||||
nextPutAll: '>'
|
15
ContactBook.package/Contact.class/properties.json
Normal file
15
ContactBook.package/Contact.class/properties.json
Normal file
@@ -0,0 +1,15 @@
|
||||
{
|
||||
"category" : "ContactBook",
|
||||
"classinstvars" : [
|
||||
],
|
||||
"classvars" : [
|
||||
],
|
||||
"commentStamp" : "VeitHeller 5/12/2018 14:05",
|
||||
"instvars" : [
|
||||
"fullname",
|
||||
"email" ],
|
||||
"name" : "Contact",
|
||||
"pools" : [
|
||||
],
|
||||
"super" : "Object",
|
||||
"type" : "normal" }
|
Reference in New Issue
Block a user