Automagically generate Erlange record with object like functions.