Skip to Content
The Zen of Ruby
In Case of Many Options

Excellent. Regular if/else statements aren’t the only ones we can refactor, though—a chain of if/elsif/else statements can clean up really nicely, too!



Refactor the if/elsif/else statement in the editor into a tidy case statement.

Folder Icon

Take this course for free

Already have an account?