Socialmetrica/Socialmetrica.package/TweetsCollection.class/instance/oldestOf..st

7 lines
310 B
Smalltalk

accessing
oldestOf: userId
self messages ifNil: [ ^ nil ].
self messages ifEmpty: [ ^ nil ].
^ ((self select: [ :tweet | tweet authorId = userId ])
select: [ :tweet | tweet created = (((self select: [ :each | each authorId = userId ]) collect: [ :each | each created ]) asSortedCollection first)]) first