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)

👋 Kindness is contagious

Value this insightful article and join the thriving DEV Community. Developers of every skill level are encouraged to contribute and expand our collective knowledge.

A simple “thank you” can uplift someone’s spirits. Leave your appreciation in the comments!

On DEV, exchanging expertise lightens our path and reinforces our bonds. Enjoyed the read? A quick note of thanks to the author means a lot.

Okay