On Thu, Oct 11, 2012 at 2:27 AM, dis guy <[email protected]> wrote:
> I am a newbie to ruby please explain your answers thoroughly. I am
> having a lot of difficulties with the syntax. Thanks for the help.
>
> I want to call this missing method:
>
> redcars= myclass.select_cars_where_color("==", "red")
Why do you want to do that? The proper way to code that selection would be
redcars = myclass.select {|car| car.color == "red"}
Kind regards
robert
--
remember.guy do |as, often| as.you_can - without end
http://blog.rubybestpractices.com/
-- You received this message because you are subscribed to the Google Groups
ruby-talk-google group. To post to this group, send email to
[email protected]. To unsubscribe from this group, send email
to [email protected]. For more options, visit this
group at https://groups.google.com/d/forum/ruby-talk-google?hl=en