Oct. 17, 2017
9:46 a.m.
newFromAccessors: aCollection ofObject: anObject "Performs supplied accessors on anObject and returns my instance with accessor -> result pairs." ^ self newFrom: (aCollection collect: [ :each | each -> (anObject perform: each) ]) "I use it for example in this piece of code: NeoJSONObject newFromAccessors: #(good bad) ofObject: self dao sumOfAllAnswers "