Passing arguments to your own generator

Hi,

I want to create my own generator, I know how to pass the file_name at
command prompt for the generator. I need help for passing and receiving
other arguments to the generator.

For example

ruby script/generate genertor_name controller_name arg1 arg2 arg3

               How to access the values of arg1, arg2 etc.

Regards,
Kiran