Inline Percent Operator in Ruby
A quick tip, which I hadn’t discovered even after several years of using ruby professionally - you can use the % operator as an infix operator to perform string formatting.
1
|
|
It follows all the same formatting codes as the regular string format functions.