20 lines
553 B
Smalltalk
20 lines
553 B
Smalltalk
|
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
|
||
|
|