Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR RUBY

ruby case statement multiple conditions

case [condition_1, condition_2, condition_3]
when [true, true, true]  
  puts "case 1"
when [true, true, false]
  puts "case 2"
...
else  
  puts "Default"
end
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #ruby #case #statement #multiple #conditions
ADD COMMENT
Topic
Name
3+5 =