Ruby/Statement/unless as Modifiers

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

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

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