Code smell: redundant information of folder name and file name.

This commit is contained in:
Offray Vladimir Luna Cárdenas 2022-04-06 13:24:51 -05:00
parent 7bab421f80
commit 6a60f4f13f
2 changed files with 3 additions and 3 deletions

View File

@ -6,8 +6,8 @@ storeContents
dehidratated := self copy. dehidratated := self copy.
dehidratated tweets: nil. dehidratated tweets: nil.
objectString := STON toStringPretty: dehidratated. objectString := STON toStringPretty: dehidratated.
directory := (FileLocator userData / 'Socialmetrica' / self userName) ensureCreateDirectory. directory := self folder ensureCreateDirectory.
oldFile := directory / self userName, 'ston'. oldFile := directory / 'profile', 'ston'.
oldFile exists ifFalse: [ oldFile exists ifFalse: [
^ MarkupFile exportAsFileOn: oldFile containing: objectString ]. ^ MarkupFile exportAsFileOn: oldFile containing: objectString ].

View File

@ -5,5 +5,5 @@ reStoreDefinition
define: #userName as: String; define: #userName as: String;
define: #profileImageUrl as: String; define: #profileImageUrl as: String;
define: #profileBio as: String; define: #profileBio as: String;
define: #createdAt as: String; "define: #createdAt as: String;"
yourself. yourself.