# Passing arguments to your own generator

**URL:** <https://www.ruby-forum.com/t/passing-arguments-to-your-own-generator/145037>\
**Category:** Rails\
**Created:** [August 5, 2008, 3:05pm UTC](https://www.ruby-forum.com/t/passing-arguments-to-your-own-generator/145037 "2008-08-05T15:05:20Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![kirankinuforu](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/k/977dab/32.png) [@kirankinuforu](https://www.ruby-forum.com/u/kirankinuforu)\
**Post date:** [August 5, 2008, 3:05pm UTC](https://www.ruby-forum.com/t/passing-arguments-to-your-own-generator/145037/1 "2008-08-05T15:05:20Z")

</div>

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
