Replace class_attribute helper with real methods