# Command line arguments

**URL:** <https://www.ruby-forum.com/t/command-line-arguments/104039>\
**Category:** Ruby\
**Created:** [May 13, 2007, 3:31pm UTC](https://www.ruby-forum.com/t/command-line-arguments/104039 "2007-05-13T15:31:40Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![unknown](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/u/4bbf92/32.png) [@unknown](https://www.ruby-forum.com/u/unknown)\
**Post date:** [May 13, 2007, 3:31pm UTC](https://www.ruby-forum.com/t/command-line-arguments/104039/1 "2007-05-13T15:31:40Z")

</div>

Hi,

I wrote a ruby script using command line options for configuration  
purposes.  
Now I want to write a second script which should call the first one  
setting some options as default.

What is the best way to do this?

As far as I know, I can not pass option to include or require.

Thanks  
Peter

---

<div class="post-metadata">

**Author:** ![unknown](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/u/4bbf92/32.png) [@unknown](https://www.ruby-forum.com/u/unknown)\
**Post date:** [May 13, 2007, 4:50pm UTC](https://www.ruby-forum.com/t/command-line-arguments/104039/2 "2007-05-13T16:50:46Z")

</div>

On 13.05.2007 15:28, removed\_email\_address@domain.invalid wrote:

> I wrote a ruby script using command line options for configuration  
> purposes.  
> Now I want to write a second script which should call the first one  
> setting some options as default.
> 
> What is the best way to do this?
> 
> As far as I know, I can not pass option to include or require.

If you want to invoke it via “load” (i.e. in the same process) then you  
should probably use another mechanism to transport configuration  
information. For example, you write your classes that do something and  
provide settings directly - if you are in the same process there is  
really no point in creating string based arguments and parsing them in  
the other bit.

Kind regards

robert
