Status: Fixed
Owner: ----
Labels: Type-Defect Priority-Medium
New issue 741 by stephane...(a)gmail.com: better code and comment
http://code.google.com/p/moose-technology/issues/detail?id=741
MooseGroupRuntimeStorage>>at: uniqueName ifAbsent: exceptionBlock
| entity na |
na := uniqueName asSymbol.
"look first by name and if not found"
entity := byName at: na ifAbsent: [nil].
entity notNil ifTrue: [^entity].
"iterates over all the elements"
entity := self
detect: [:each | na == each mooseName asSymbol]
ifNone: exceptionBlock.
entity notNil ifTrue: [byName at: na put: entity].
^entity