Home > ruby > if statement with multiple conditions in ruby

if statement with multiple conditions in ruby

October 7th, 2008 Leave a comment Go to comments

It is difficult to find the examples demonstrating how to combine two conditions in the if statement of ruby, I tried and found following code is ok:

tmp = rand(10)

if ((tmp > 5) && (ie77.text.include? ‘fine’))
puts “fine”

else

sleep 7
end



Categories: ruby Tags:
  1. No comments yet.
  1. No trackbacks yet.
      
                  
      

*
To prove you're a person (not a spam script), type the security word shown in the picture. Click on the picture to hear an audio file of the word.
Click to hear an audio file of the anti-spam word