DEV Community

Felix Imbanga
Felix Imbanga

Posted on

Refactoring - Ruby

case statement - a concise alternative to if/else statements. I wondered why there's so much change between the syntax of case and if/else statements.

There should be 4 verbs of your programs operations aka operations that add, display, update, and delete or CRUD for short. These are actions you take when you update an entry in a database, ask a website for info, write a blog post. I'll see these in everything from API calls to web frameworks like ruby on rails.

Ruby is a language prioritizing program productivity over program optimization.

I don't need and end when my if statement is on one line.

Top comments (0)