[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

Command line arguments

Peter.Meier998

5/13/2007 1:29:00 PM

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

1 Answer

Robert Klemme

5/13/2007 2:46:00 PM

0

On 13.05.2007 15:28, Peter.Meier998@gmx.de 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