NameSpace.st
changeset 10587 d0e5f934141a
parent 10372 44ba935b47ba
child 11999 5c5947a4b464
child 17711 39faaaf888b4
equal deleted inserted replaced
10586:7249c850299f 10587:d0e5f934141a
   319     ^ cls
   319     ^ cls
   320 
   320 
   321     "Modified: 8.11.1996 / 21:40:01 / cg"
   321     "Modified: 8.11.1996 / 21:40:01 / cg"
   322 !
   322 !
   323 
   323 
       
   324 at:aKey ifPresent:aBlock
       
   325     "try to retrieve the value stored at aKey.
       
   326      If there is nothing stored under this key, do nothing.
       
   327      Otherwise, evaluate aBlock, passing the retrieved value as argument."
       
   328 
       
   329     (self includesKey:aKey) ifTrue:[
       
   330         ^ aBlock value:(self at:aKey)
       
   331     ].
       
   332     ^ nil
       
   333 
       
   334     "Modified: / 31-05-2007 / 17:50:46 / cg"
       
   335 !
       
   336 
   324 at:classNameSymbol put:aClass
   337 at:classNameSymbol put:aClass
   325     "add a class to the namespace defined by the receiver"
   338     "add a class to the namespace defined by the receiver"
   326 
   339 
   327     ^ self privateClassesAt:classNameSymbol put:aClass
   340     ^ self privateClassesAt:classNameSymbol put:aClass
   328 
   341 
   589 ! !
   602 ! !
   590 
   603 
   591 !NameSpace class methodsFor:'documentation'!
   604 !NameSpace class methodsFor:'documentation'!
   592 
   605 
   593 version
   606 version
   594     ^ '$Header: /cvs/stx/stx/libbasic/NameSpace.st,v 1.65 2007-02-05 15:40:19 stefan Exp $'
   607     ^ '$Header: /cvs/stx/stx/libbasic/NameSpace.st,v 1.66 2007-05-31 16:28:08 cg Exp $'
   595 ! !
   608 ! !