Vals-by-class generating macro