elsif means "else if":
fruit = "orange" if fruit == "orange" color = "orange" elsif fruit == "apple" color = "green" elsif fruit == "banana" color = "yellow" else # from ww w.j a v a 2s. com color = "unknown" end