basics/elsif_basic.rb

tests/_examples/basics/elsif_basic.rb in the metorex repository.

# Basic elsif example
x = 5

if x < 0
  puts "negative"
elsif x == 0
  puts "zero"
elsif x < 10
  puts "small positive"
else
  puts "large positive"
end

Output:

small positive