opts.on('-d','--delete',"Remove annotations from all model files"){task=:remove_annotation}
opts.on('-p','--position [before|after]',['before','after'],"Place the annotations at the top (before) or the bottom (after) of the model file"){|p|ENV['position']=p}
opts.on('-r','--routes',"Annotate routes.rb with the output of 'rake routes'"){task=:annotate_routes}
opts.on('-v','--version',"Show the current version of this gem"){puts"Annotate v#{Annotate::VERSION}";exit}
opts.on('-m','--show-migration',"Include the migration version number in the annotation"){ENV['include_version']="yes"}
opts.on('-i','--show-indexes',"List the table's database indexes in the annotation"){ENV['show_indexes']="yes"}
opts.on('--model-dir dir',"Annotate model files stored in dir rather than app/models"){|dir|ENV['model_dir']=dir}