Hi!

I'd just like to know if there is some pragma (eg. <onlyForMe>) which would say to a (class-level) method only to use the code in the case self is method definition class, otherwise just delegate to super.

I only see it useful in class-side `initialize` method, as in:

  Foo class >> initialize
    self == Foo ifTrue: [ registry := Dictionary new ].
    ^ super initialize

would be

  Foo class >> initialize
    <onlyForMe>
    registry := Dictionary new

Asking because I look for a way to easily subclass JS classes in Amber and such pragma would be useful in such cases, and since Amber treats Pharo as a reference, asking for the name of the pragma if there is one.

Thanks, Herby

Reply via email to