I'm learning Ruby and I would like to know if I have used the good syntax. My script works, but can I simplify it and make it more elegant.
puts "Hello, what is youre name?"
name = gets.chomp
puts "Are you a boy? (yes/no)"
genre = gets.chomp
if genre == ("yes")
puts "Do you like soccer #{name}? (yes/no)"
foot = gets.chomp
if foot == ("yes")
puts "And beer? (yes/no)"
biere = gets.chomp
if biere == ("yes")
puts "Nice buddy!"
else
puts "Too bad #{name}! But you like soccer!"
end
else
puts "You're complicated #{name}!!!"
end
else
puts "Do you like romantics movies?"
film = gets.chomp
end