You can access instance variables directly by sending the object #instVarNamed:
. This is a private method though and should only be used if you know what you are doing, or for debugging.
You would use #instVarNamed:
in your example the following way, assuming the instance variable of your class is called theDigit
:
...
Transcript show: (myDigitClass instVarNamed: 'theDigit').
...
The transcript will show the value effectively stored (e.g. nil
).