Implement attribute matching for the class attribute.