Ruby/Language Basics/Code statement
Материал из Wiki.crossplatform.ru
Версия от 17:10, 26 мая 2010; (Обсуждение)
Group multiple expressions into a single expression
age = 24 puts "You"re NOT a teenager" unless age > 12 && age < 20
You don"t need any end-of-line marker at all in Ruby.
# If you can"t fit a Ruby statement on one line, # you can tell Ruby that you are continuing that line of code on a second line by using backslashes puts \ "Hello from Ruby."