Category / Ruby 3.X

How to write single line functions in ruby


Ruby provides several ways using which one can write one line functions. However, over the years, having done several code reviews, I've seen this feature seldom used. In this article, we will go through various way of writing single-line functions.

One line functions as the name imply is a short function which takes 1 LOC. Because they are short...

Read More