Supporting functions as well as attribute names

This departs from Rails functionality a little bit, but makes the library more powerful.