Command line arguments ruby

argumentos en linea de comando
Posted by Foreero I. (ivmafo)
on 20.01.2009 17:02

Hola, me gustaria saber si existe alguna forma de generar mis propios
argumentos en una linea de comando . Algo asi como como se usa el ARGV:

$ ruby miscript.rb --miargumento1=1 --miargumento2=2 …

para poder usar las variables “miargumentoX” dentro de mi script ruby

Gracias de antemano…

Sorry for my poor english…
Iwould like to know if there is any way to create my own command line
arguments. like ARGV

something like this:

$ ruby myscript.rb --myargument1=1 --myargument2=2 …

and use the “myargumentX” innto my script ruby

2009/1/20 Foreero I. [email protected]:

Sorry for my poor english…
Iwould like to know if there is any way to create my own command line
arguments. like ARGV

something like this:

$ ruby myscript.rb --myargument1=1 --myargument2=2 …

and use the “myargumentX” innto my script ruby

You probably rather want to know how to parse command line
arguments, don’t you? In that case please have a look at
OptionParser.

Kind regards

robert