Rewrite attribute helper as a hook.
Merge pull request #154 from rwjblue/attribute-hook

Rewrite attribute helper as a hook.