Issue 741 in moose-technology: better code and comment

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Issue 741 in moose-technology: better code and comment

moose-technology
Status: Fixed
Owner: ----
Labels: Type-Defect Priority-Medium

New issue 741 by [hidden email]: 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

_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev