Inline generation of parse method
Also set attr in addMethod test