Add basic attr function and _warn method