Initial methods for tweets histogram.
This commit is contained in:
parent
d61490e96c
commit
0da5c06527
@ -0,0 +1,8 @@
|
||||
accessing
|
||||
belongsToSegment: segmentBodersCollection
|
||||
|
||||
segmentBodersCollection allButLast keysAndValuesDo: [ :i :elem |
|
||||
(elem < self created and: [ self created <= (segmentBodersCollection at: i + 1) ])
|
||||
ifTrue: [ ^ i ]
|
||||
].
|
||||
^ false
|
@ -1,3 +1,3 @@
|
||||
accessing
|
||||
created
|
||||
^ created
|
||||
^ created ifNotNil: [ ^ ZTimestamp fromString: created ]
|
@ -1,3 +1,3 @@
|
||||
accessing
|
||||
messages: aTweetsCollection
|
||||
^ tweets := aTweetsCollection
|
||||
^ messages := aTweetsCollection
|
@ -1,3 +1,3 @@
|
||||
accessing
|
||||
messages
|
||||
^ tweets ifNil: [ tweets := OrderedCollection new]
|
||||
^ messages ifNil: [ messages := OrderedCollection new ]
|
@ -1,7 +1,7 @@
|
||||
accessing
|
||||
newest
|
||||
self messages ifNil: [ ^ nil ].
|
||||
self messages ifNilEmpty: [ ^ nil ].
|
||||
self messages ifEmpty: [ ^ nil ].
|
||||
self pinned created > self messages second created
|
||||
ifTrue: [ ^ self pinned ]
|
||||
ifFalse: [ ^ self messages second ]
|
@ -0,0 +1,8 @@
|
||||
accessing
|
||||
pinned
|
||||
| first second |
|
||||
first := self messages first.
|
||||
(first metadata at: 'pinned') = 1
|
||||
ifFalse: [ ^ first ].
|
||||
second := self messages second.
|
||||
^ first created
|
@ -6,8 +6,8 @@
|
||||
"pools" : [ ],
|
||||
"classvars" : [ ],
|
||||
"instvars" : [
|
||||
"tweets",
|
||||
"query"
|
||||
"query",
|
||||
"messages"
|
||||
],
|
||||
"name" : "TweetsCollection",
|
||||
"type" : "normal"
|
||||
|
Loading…
Reference in New Issue
Block a user