extensions
Accessing Succinctly
By Sam Phillips - Posted on June 2nd, 2008
Tagged: class
• extensions
There are times when you have code that looks like this:
Object subclass: MyNewClass [
| foo bar baz traz bif |
foo [ ^ foo ]
bar [ ^ bar ]
baz [ ^ baz ]
traz [ ^ traz ]
bif [ ^ bif ]
foo: aFoo [ foo := aFoo ]
traz: aTraz [ traz := aTraz ]
baz: aBaz [ baz := aBaz ]
myMethod [
"Do something with all of those instance variables"
]
]
