Mega Code Archive

 
Categories / Ruby / Statement
 

Use the multiline ifelse option

age = 10 if age < 18   type = 'child' else   type = 'adult' end puts "You are a " + type