From f52e027eddb3d7fcb945034e449736d36d23f24f Mon Sep 17 00:00:00 2001 From: Offray Luna Date: Tue, 31 Oct 2023 16:02:18 -0500 Subject: [PATCH] Modularizing the code under proper responsable classes. --- src/MiniDocs/OrderedDictionary.extension.st | 17 ++--------------- 1 file changed, 2 insertions(+), 15 deletions(-) diff --git a/src/MiniDocs/OrderedDictionary.extension.st b/src/MiniDocs/OrderedDictionary.extension.st index a3366bf..4ab1a3f 100644 --- a/src/MiniDocs/OrderedDictionary.extension.st +++ b/src/MiniDocs/OrderedDictionary.extension.st @@ -9,21 +9,8 @@ OrderedDictionary >> addErrata: noteString [ OrderedDictionary >> asLepiterSnippet [ | response | self at: 'className' ifAbsent: [ ^ nil ]. - (self at: 'className') = 'LeTextSnippet' - ifTrue: [ - response := LeTextSnippet new. - response string: (self at: 'content') - ]. - (self at: 'className') = 'LePharoSnippet' - ifTrue: [ - response := LePharoSnippet new. - response code: (self at: 'content') - ]. - (self at: 'className') = 'LePictureSnippet' - ifTrue: [ - response := LePictureSnippet new. - response fromString: (self at: 'content') - ]. + response := (self at: 'className') asClass new. + response fromString: (self at: 'content'). response uid: (LeUID new uidString: (self at: 'id')); parent: (self at: 'parent');