Modularizing the code under proper responsable classes.
This commit is contained in:
parent
372c6a6a55
commit
f52e027edd
@ -9,21 +9,8 @@ OrderedDictionary >> addErrata: noteString [
|
|||||||
OrderedDictionary >> asLepiterSnippet [
|
OrderedDictionary >> asLepiterSnippet [
|
||||||
| response |
|
| response |
|
||||||
self at: 'className' ifAbsent: [ ^ nil ].
|
self at: 'className' ifAbsent: [ ^ nil ].
|
||||||
(self at: 'className') = 'LeTextSnippet'
|
response := (self at: 'className') asClass new.
|
||||||
ifTrue: [
|
response fromString: (self at: 'content').
|
||||||
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
|
response
|
||||||
uid: (LeUID new uidString: (self at: 'id'));
|
uid: (LeUID new uidString: (self at: 'id'));
|
||||||
parent: (self at: 'parent');
|
parent: (self at: 'parent');
|
||||||
|
Loading…
Reference in New Issue
Block a user