I want to write a method that generate a method that when I execute
this recreates the objects that I STONified.
(I love STON).
So I did something like that
"self new descriptionMethodFrom: ChrysalConfigurationDescription
^ String streamContents: [ :s |
s nextPutAll: 'descriptions'; cr.
s nextPutAll: '^ STON fromString: '.
s nextPutAll: (STON toStringPretty: descriptionItems) ]
and I get of course something wrong :) because the strings are not
doubel quoted and the first expression is not surrounded by single
And I could do it but I want a smart way to do it. I was thinking that
may be I'm missing something obvious.
^ STON fromString: [
#propertyName : 'title',
#default : 'my super cool book'
#propertyName : 'verbose',
#default : 'true'
#propertyName : 'attribution',
#default : 'me, myself and I'
#propertyName : 'series',
#default : 'Square Bracket Associate Collection'