General ruby templating with json, bson, xml, plist and msgpack support