all: intial code import

This commit is contained in:
2018-05-12 15:25:36 +02:00
parent 1f20ee2574
commit 9f47b858c3
59 changed files with 375 additions and 0 deletions

View 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

View File

@@ -0,0 +1,6 @@
instance creation
newNamed: aNameString email: anEmailString
^ self new
fullname: aNameString;
email: anEmailString;
yourself

View File

@@ -0,0 +1,3 @@
accessing
email: aString
email := aString

View File

@@ -0,0 +1,3 @@
accessing
email
^ email

View File

@@ -0,0 +1,3 @@
accessing
fullname: aString
fullname := aString trimBoth

View File

@@ -0,0 +1,3 @@
accessing
fullname
^ fullname

View File

@@ -0,0 +1,3 @@
accessing
gravatarUrl
^ 'http://www.gravatar.com/avatar/', (MD5 hashMessage: email trimBoth asLowercase) hex, '.jpg'

View File

@@ -0,0 +1,7 @@
printing
printOn: aStream
aStream
nextPutAll: self fullname;
nextPutAll: ' <';
nextPutAll: self email;
nextPutAll: '>'

View 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" }