[Newbies] Ruby macros

itsme213 itsme213 at hotmail.com
Sun Jul 2 04:33:04 UTC 2006

I miss my Ruby macros (1st day in Squeak and I love it ... dislike the 
camelCase tho'). Would this be the correct way to go about it?


class Class
  def has_many symbol
     ...generate getter/setter with Collection.new

class House
  has_many :doors # just remove this line to "Undo" !


!Class methodsFor: 'macros' stamp: 'xy 7/1/2006 18:34'!
has_many: aSymbol
  ... generate getter/setter with (Collection new)
  ... record meta-data fact on the class itself ! !

undo_has_many: aSymbol
  ... check meta-data on the class
  ... remove getter/setter ! !

Any starting hints for:
(a) what would I put in the "...." :-)
(b) how to put these onto convenient popup menus?
(c) pointers to specific freely available stuff like these?

Many thanks.

More information about the Beginners mailing list