Ruby/Statement/unless as Modifiers

Материал из Wiki.crossplatform.ru

Версия от 18:00, 13 сентября 2010; ViGOur (Обсуждение | вклад)
(разн.) ← Предыдущая | Текущая версия (разн.) | Следующая → (разн.)
Перейти к: навигация, поиск

Using unless as Modifiers

temperature = 76
puts "Picnic time!" unless temperature < 65



Using unless as Modifiers with boolean operator

temperature = 76
puts "Picnic time!" unless temperature < 65 || temperature > 85