10 lines
352 B
Smalltalk
10 lines
352 B
Smalltalk
accessing
|
|
newestOf: userName
|
|
|
|
| user |
|
|
user := (TwitterUser storedInstances select: [ :each | each userName = userName ]) first.
|
|
self messages ifNil: [ ^ nil ].
|
|
self messages ifEmpty: [ ^ nil ].
|
|
user messages: self.
|
|
^ ((user tweets)
|
|
select: [ :tweet | tweet created = ((self collect: [ :each | each created ]) asSortedCollection last)]) first. |