Hi -- I'm very new to Ruby. I would like to start attending your informal meetings on Thursday evenings. In the meantime, I'm wondering if anyone can explain...
Default arguments cannot be followed by non default arguments (how would you setup a condition that you passed nothing, and them something) you could do def...
I intend to show up if you guys meet. ... -- Fabrizio Novo President Kafa SNC http://allwineries.com...
Fabrizio Novo
fabrizio@...
Mar 7, 2007 11:56 pm
720
Well, it's too late to accept any more RSVPs. Officially, I'm cancelling the meeting. If anybody still shows up and still wants to hang out that's fine, but...
... That's disappointing. I was planning on making this my first meeting. However, it sounds like there is going to be no one there. Hopefully there will be...
Yeah, we need at least 3 or 4 RSVPs, ideally before noon on the day of the meeting. We'll try again in the next 2 weeks. From: ocruby@yahoogroups.com...
defined? blah Thanks very much. ... doug ____________________________________________________________________________________ Be a PS3 game guru. Get your game...
The most straightforward way to do this is just a case statment based on the class of the object, which you can get by calling #class. Something like: case...
From the Pickaxe book. Ruby classes are instances of class Class, which defines === as a test to see if the argument is an instance of the class or one of its...
... Any object's class is accessible through the class method. You can also pass the method is_a? a class to check against; this is preferable because it will...
OK. I must be an idiot. (BTW, I deeply appreciate all of the insightful suggestions that I received.) However, I can't seem to get even the simplest...
It should be case myvar when String: puts('A String') when Array: puts('An Array') end doing the case myvar.class will give value if you have a when Class:...
Thanks, Forrest. While clearly correct, your answer comes as a bit of a surprise. I guess I'm going to have to re-think my understanding of Ruby conditions....
It's not ruby conditions, it's just the case statement. The case statement uses ===, which does interesting things. Kev ... -- Kevin Clark http://glu.ttono.us...
... Yeah, don't feel bad about not understanding it at first glance. I would say it's fairly unintuitive. However, I still hold that wanting to branch based on...
... I totally understood that and I wasn't taking your suggestion lightly. That's why I made mention of the fact that I couldn't get even the simplest of...
HI Doug: As Kevin ('sup? How's life in the Bay now?) pointed out, case uses the === operator and thus is quite a bit more powerful than the switch statements...
Without seeing your code, I would say in general that switch/case statements usually beg for polymorphism. Really simplfies the code. From your description I...
BarCamp is an ad-hoc gathering born from the desire for people to share and learn in an open environment. It is an intense event with discussions, demos, and...