An attempt at attribute hooks

This code seems to be quite complicated to be in README. I wonder if you can show a simpler one to easily grasp the idea.