How to extend a rails 3 generator

I would like to figure out how to extend an existing generator with
new class_option ecc. If i put the extension into lib/generators folder,
it replaces the original. Who can solve this doubt?