[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 ruby

Foreero Ivan

1/20/2009 4:26:00 PM

argumentos en linea de comando
Posted by Foreero Ivan (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
--
Posted via http://www.ruby-....

3 Answers

Robert Klemme

1/21/2009 8:11:00 AM

0

2009/1/20 Foreero Ivan <ivmafo@gmail.com>:
> 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

--
remember.guy do |as, often| as.you_can - without end

Russell Watson

7/3/2014 7:48:00 PM

0

On 7/3/2014 3:18 PM, Bill Steele wrote:
> On 7/3/14, 4:08 AM, KalElFan wrote:
>> Back on June 13, Nikki Finke broke the news on the schedule
>> of DC movies to be announced at SDCC. One of the key things
>> she mentioned is that on the movie side (probably Batman v
>> Superman)...
>>
>> "...cameos will include the already known Cyborg and Flash..."
>>
>> Conceivably, Nikki may have just been relaying what her source
>> told her and she might not have realized the implication of it.
>> Nevertheless her sources are usually good, and the only credible
>> interpretation of an "already known" Flash is the one that Grant
>> Gustin is playing on The CW. He's already had the two episodes
>> on Arrow, and the buzz surrounding the straight-to-series new
>> The Flash on The CW is second to none. Gotham on Fox may be
>> tied with it, so DC's on a roll.
>>
>> If you're interested in discussion of Nikki's scoop from June 13,
>> there's a thread that I started on these same five groups here,
>> courtesy Adam's best cyber-friend Google Groups:
>>
>> https://groups.google.com/forum/?f...!topic/rec.arts.tv/xmhYjD__Q8g
>>
>>
>> Now here's some more food for (integration!) thought...
>>
>> http://ca.ign.com/articles/2014/04/08/david-goyer-says-warner-brothers-would-love-to-make-their-dc-universe-mor...
>>
>>
>>
>> That was three months ago and Goyer is very much in the DC loop.
>> He's apparently writing Sandman, one of the movies Nikki said
>> would be announced at SDCC.
>>
>> There was also a recent official casting announcement on Man of
>> Steel, 36-year-old Scoot McNairy:
>>
>> http://screenrant.com/batman-v-superman-movie-scoot-mcn...
>>
>> http://www.imdb.com/name/...
>>
>> Most of the speculation seems to be that he'll play Robin,
>> or Nightwing as the modern version of Robin is called. He's
>> about the right age given the older Batman. He slam-dunk
>> looks the part IMO, and not just physically and facially. His
>> two pictures above convey a tougher vibe, or version of the
>> character, than previous actors who've played him.
>>
>> Within the last year there's also been speculation that a
>> character like Nightwing would be suitable for The CW side.
>> So why not cast an actor like McNairy? He's hardly above
>> doing television -- he already has both 2013 and 2014 TV
>> series credits on IMDb. So there again, a perfect fit.
>>
>> Warners just announced a big event at SDCC for its three
>> TV series this Fall (in addition to The Flash and Gotham, the
>> other is Constantine on NBC). So a surprise crossover of
>> The Flash and Arrow actors, at the DC Movie event, is an
>> obviously feasible plan.
>>
>> On the issue of exactly how it could be integrated, there
>> was another credible report that Batman v Superman will
>> take place about two years after the first one. The only
>> relevant date I've found on the Man of Steel Blu-Ray is on
>> a Nikon camera that Lois uses while in the Arctic. It had
>> September 25, 2013 on it. It's when she was taking a
>> picture of Clark (aka "Joe" to her at the time) as he was
>> off in the distance approaching the Scout Ship aka the
>> Fortress. Clark didn't know what the Scout Ship was at
>> the time, but for example he meets Jor-El's avatar or
>> consciousness played by Russell Crowe.
>>
>> Fast Forward to later in the movie and we've seen interim
>> backstory moments where Lois has traced "Joe" all the way
>> back to Smallville. So the issue is how long did that take,
>> after the Septenber 25, 2013 date on her camera? The
>> military was probably keeping the whole thing a secret
>> in the interim, and it wasn't until weeks later, at least,
>> that Lois leaked her story to the blogger and Zod showed
>> up. It was only when Zod showed up that the world first
>> became aware of aliens, i.e. the First Contact premise of
>> Man of Steel.
>>
>> As it happens, we have an answer on when that date was
>> from the "Planet Krypton" documentary on the Man of Steel
>> Blu-Ray. :-) It has a Daily Planet page 1, on Superman
>> saving the world, and it's dated November 12, 2013. In the
>> body of the story written by Lois Lane, it refers to Zod and
>> his ship having arrived only days prior. So Early November
>> 2013 is when First Contact happened in the Man of Steel
>> universe.
>>
>> Of course an extra on the Blu-Ray doesn't have to be canon,
>> but let's say it is. Allegedly there was a 2013 date in Arrow
>> last season, some phone or other in an episode. I ran across
>> it on some article's comment section, some guy arguing it
>> would be impossible to integrate with Man of Steel since
>> Man of Steel was 2013. For starters though, it would depend
>> what the exact date was. October 2013 or earlier wouldn't
>> preclude intergration at all. A date later, say November 10,
>> 2013, could easily be written off as the person's phone just
>> being wrong.
>>
>> There's only so much backstory that Batman v. Superman will
>> have time for in May 2016 when it's released. Perhaps it'll
>> start in real time so to speak, i.e., May 2016 in the Man of
>> Steel universe. That'd be just under 2 1/2 years after the
>> arrival of Zod, so close enough to the "about two years" that
>> the credible source had cited. Another possibility might be
>> that there's an immediate aftermath that's briefly covered,
>> referencing the first six months, and then it skips forward
>> two years. Or other mix-and-match possibilities.
>>
>> That would give both Arrow and The Flash the 2014-2015
>> and 2015-2016 seasons to integrate. Most of the First
>> Contact aftermath would be taking place in Gotham and
>> Metropolis, so it needn't dominate or overshadow what
>> they have planned for the two series. But it provides a
>> great opportunity to reference how the world has reacted
>> to First Contact, how The Flash (if/when he goes public)
>> fits into a new superhero world and so on. Crossovers
>> with Nightwing and the like, same thing. Both Arrow and
>> The Flash will become even more must-see TV for those
>> interested in the now integrated Man of Steel universe
>> that it's all a part of.
>>
>> Warner Bros. Television owns Arrow and The Flash, so it's
>> 100% in house in that sense. CBS owns half of The CW
>> (Warners the other half). So CBS will share in the profits
>> of The CW, but there's no obstacle to Warners doing this
>> integration. As Nikki's source pointed out, getting contracts
>> and the like signed has been one of the things Warner Bros.
>> has been most preoccupied with in the lead-up to SDCC.
>>
>> I think they're doing it, at SDCC. If they aren't I think it's a
>> big, big mistake, and a huge missed opportunity.
>
>
> What's missing so far is any reference in the CW world to the movies. On
> Agents of SHIELD there are occasional mentions of Thor, Captain America
> and of course "New York." You'd think that when masked vigilantes are
> running around in Starling City it would be inevitable for someone to
> mention Batman.

If I'm not totally misremembering something, even the "Lois and Clark"
TV show had an episode that had a Batmobile in it, in a lab or something
that Superman had to go to, as a nod to the fact the the show occurred
in the same universe as the first series of Batman films that were still
in production at the time, even though there were no known plans for any
sort of crossover at the time.

Super-Menace

7/3/2014 10:35:00 PM

0

In article <lp4c0m$7nh$1@dont-email.me>, Russell Watson
<russell-watson@comcast.net> wrote:


> If I'm not totally misremembering something, even the "Lois and Clark"
> TV show had an episode that had a Batmobile in it, in a lab or something
> that Superman had to go to, as a nod to the fact the the show occurred
> in the same universe as the first series of Batman films that were still
> in production at the time, even though there were no known plans for any
> sort of crossover at the time.


There was a veiled reference to the Batmobile in the S3 episode "Don't
Tug on Superman's Cape," where master thieves Tim and Amber Lake
reminisce that they'd stolen it and still retained possession of it.

Yeah, I don't think they'd have gotten away with it, either.

BTW the Lakes were played by Jonathan Frakes and his wife, Genie
Francis.