RoloLudo/RoloLudo.package/SfOracle.class/instance/optionsWikiTextRow..st

20 lines
553 B
Smalltalk
Raw Normal View History

2021-12-05 18:58:22 +00:00
accessing
optionsWikiTextRow: value
| output |
value class = String ifTrue: [ ^ value , '|' ].
output := '' writeStream.
output
nextPutAll: (value at: 'Description'), ' |'.
value keys size > 1 ifTrue: [ | remaining cell |
remaining := value copy removeKey: 'Description'; yourself.
cell := remaining values.
cell class = Array ifTrue: [
cell first doWithIndex: [:each :i |
output nextPutAll: '[[', each asString,']] '.
(i % 2 = 1) ifTrue: [output nextPutAll: '; ' ]
]
].
output nextPutAll: '|'.
].
^ output contents