Code review: Fixing some code smells.
This commit is contained in:
parent
f168045520
commit
7bab421f80
@ -1,4 +1,4 @@
|
||||
accessing
|
||||
config
|
||||
|
||||
^ config
|
||||
^ config ifNil: [ config := Dictionary new ]
|
@ -1,4 +1,6 @@
|
||||
accessing
|
||||
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.
|
||||
collectionsWords := ((rawTweets select:
|
||||
[ :tweet | tweet user userName = 'FranciaMarquezM' ])
|
||||
[ :tweet | tweet user userName = self userName ])
|
||||
collect: [ :tweet | (tweet words
|
||||
reject: [ :w | w includesSubstring: 'nitter42lfr' ]) ]).
|
||||
count := 1.
|
||||
collectionsWords size timesRepeat: [
|
||||
rawWords addAll: (collectionsWords at:count).
|
||||
count := count + 1.].
|
||||
collectionsWords do: [ :word | rawWords addAll: word ].
|
||||
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