Using Ruby’s gsub with a block
String#gsub is one of the most used Ruby methods in the wild. Just about every Ruby programmer knows about the method and uses it fairly regularly.
String#gsub is one of the most used Ruby methods in the wild. Just about every Ruby programmer knows about the method and uses it fairly regularly.
One can often find similar code in the wild:
Powerpack is a small Ruby library containing (at this point) a few extensions to some core Ruby classes. I guess that in a way one can say it’s something lik...
I often see people writing code like this:
Prelude