Skip to content

Commit c969b9a

Browse files
committed
add GtPharoDummyEnvironment class>>#cleanUp:
1 parent e5d33e3 commit c969b9a

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

src/GToolkit-Pharo-Coder-Examples/GtPharoDummyEnvironment.class.st

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,18 @@ Class {
77
#category : #'GToolkit-Pharo-Coder-Examples-Dummies'
88
}
99

10+
{ #category : #'as yet unclassified' }
11+
GtPharoDummyEnvironment class >> cleanUp: aggressive [
12+
"For better exploration, some examples do not clean up dummy environments.
13+
For that reason all dummy environments are cleaned up during this process."
14+
15+
aggressive ifFalse: [ ^ self ].
16+
17+
self allInstancesDo: [ :eachEnvironment |
18+
[ eachEnvironment removeFromSystem ]
19+
onErrorDo: [ :anError | anError return ] ]
20+
]
21+
1022
{ #category : #'api - generation' }
1123
GtPharoDummyEnvironment class >> withPackages: anAmountOfPackages classes: anAmountOfClasses [
1224
^ GtPharoDummiesGenerator withPackages: anAmountOfPackages classes: anAmountOfClasses

0 commit comments

Comments
 (0)