Code review: Fixing some code smells.
This commit is contained in:
parent
f168045520
commit
7bab421f80
@ -1,4 +1,4 @@
|
|||||||
accessing
|
accessing
|
||||||
config
|
config
|
||||||
|
|
||||||
^ config
|
^ config ifNil: [ config := Dictionary new ]
|
@ -1,4 +1,6 @@
|
|||||||
accessing
|
accessing
|
||||||
folder
|
folder
|
||||||
|
|
||||||
^ self config at: 'folder'.
|
^ self config
|
||||||
|
at: 'folder'
|
||||||
|
ifAbsentPut: [ FileLocator userData / 'Socialmetrica' / 'web' / 'twitter.com' / self userName ].
|
@ -7,13 +7,10 @@ writeWordsFile
|
|||||||
|
|
||||||
rawWords := OrderedCollection new.
|
rawWords := OrderedCollection new.
|
||||||
collectionsWords := ((rawTweets select:
|
collectionsWords := ((rawTweets select:
|
||||||
[ :tweet | tweet user userName = 'FranciaMarquezM' ])
|
[ :tweet | tweet user userName = self userName ])
|
||||||
collect: [ :tweet | (tweet words
|
collect: [ :tweet | (tweet words
|
||||||
reject: [ :w | w includesSubstring: 'nitter42lfr' ]) ]).
|
reject: [ :w | w includesSubstring: 'nitter42lfr' ]) ]).
|
||||||
count := 1.
|
collectionsWords do: [ :word | rawWords addAll: word ].
|
||||||
collectionsWords size timesRepeat: [
|
|
||||||
rawWords addAll: (collectionsWords at:count).
|
|
||||||
count := count + 1.].
|
|
||||||
rawWords := ' ' join:rawWords.
|
rawWords := ' ' join:rawWords.
|
||||||
|
|
||||||
^ MarkupFile exportAsFileOn: (FileLocator userData / 'Socialmetrica' / self userName / self userName, 'words', 'txt') containing: rawWords.
|
^ MarkupFile exportAsFileOn: (self folder / 'words', 'txt') containing: rawWords.
|
Loading…
Reference in New Issue
Block a user