1
0
Fork 0
This repository has been archived on 2022-02-17. You can view files and clone it, but cannot push or open issues or pull requests.
osmo-st-logging/compat_for_pharo.st

36 lines
708 B
Smalltalk

Object subclass: GSTProcessVariableHolder [
| val |
<category: 'OsmoLogging-Pharo'>
value: aValue [
<category: 'set'>
val := val.
]
value [
<category: 'get'>
^ val
]
]
ProcessLocalVariable subclass: GSTProcessVariable [
| dict |
<category: 'OsmoLogging-Pharo'>
GSTProcessVariable class >> key: aKey [
<category: 'creation'>
^ self soleInstance key: aKey.
]
dict [
<category: 'creation'>
^ dict ifNil: [dict := Dictionary new].
]
key: aKey [
<category: 'key'>
^ self dict at: aKey ifAbsent:
[self dict at: aKey put: GSTProcessVariableHolder new].
]
]